What Dig To China Actually Is
Dig To China is a batch file utility for Windows that calculates the antipodal coordinates of wherever you are on Earth, assuming you dug a hole straight down through the planet. It started as a fun little DOS trick back in the 90s but people still use it because it reliably lands most of North America in eastern China or the Pacific Ocean near China. The math behind it is straightforward. You take your current latitude and longitude, invert them, and adjust by 180 degrees. That is it. There is no magic. The core formula flips your latitude from positive to negative or vice versa. If you are at 40 degrees north, your antipodal latitude is 40 degrees south. For longitude, you add or subtract 180 depending on whether your value is east or west. A point at 74 degrees west becomes 106 degrees east after the adjustment. Put those two numbers together and you have your destination coordinates. Most of the continental United States ends up somewhere between 20 and 50 degrees north latitude and 100 to 140 degrees east longitude, which is eastern China or just off its coast in the Pacific. I have used the original batch file version on and off for years, mostly as a joke tool or a quick way to show people that the Earth is basically a globe even when they do not believe it. Here is a stripped-down working version you can copy into a file and name digtochina.bat:
set /p lat=Enter latitude (negative for south):
set /p lon=Enter longitude (negative for west):
set /a newlat=-%lat%
set /a newlon=%lon% + 180
if %newlon% gtr 180 set /a newlon=%newlon%-360
if %newlat% lss -90 set /a newlat=-90
if %newlat% gtr 90 set /a newlat=90
echo Your antipode is: %newlat% %newlon%
pause This is a simplified integer version. It will not handle decimal degrees perfectly, but it works fine for rough calculations. If you want something more precise, the logic is identical but you need floating point support. A simple PowerShell one-liner using [math] will give you full decimal accuracy in about three lines instead of twenty.
What I Have Learned From Actually Using It
The first time I ran this properly, I expected it to land exactly on Beijing because that is the popular claim. It did not. From my location in central Texas, the antipode lands in the ocean southeast of Hainan Island, not on land at all. This came up again when a coworker claimed it always lands in China. I tested it from three different US cities and only Manhattan's antipode actually hits land, and even then it is near the coast of New Zealand, not China. The whole meme is more cultural than geographical. Another problem I ran into was the batch file handling decimal inputs. Older Windows command processors truncate or reject decimals unless you force them with specific variable syntax. I spent about twenty minutes debugging why the output kept showing zeros for the decimal portion before I realized the shell was doing integer arithmetic. The fix is just to use PowerShell or Python instead of a plain .bat file if you care about precision. For a dinner table trick, it does not matter. For anything else, it absolutely does.
Get the Full Details
.png)
Limitations And Where It Fails Completely
The biggest issue is that Dig To China only works if you can accurately provide your starting coordinates. If you are using city-level approximation instead of GPS coordinates, the result can be off by hundreds of kilometers. That is not a problem with the math, it is a problem with the input. The second issue is edge cases where the antipode lands exactly on a water boundary or an international dispute zone, which makes the "you are now in China" claim legally meaningless even if it is geographically close. A few locations do not result in China at all. Hawaii's antipode is in Argentina. Maine's antipode is in the South Atlantic Ocean. Parts of the Pacific Northwest actually antipode to somewhere in South America, not Asia. So the tool is more accurately called Dig To Somewhere, and the China part is a stereotype based on where most Americans happen to live relative to the rest of the continent.
Alternatives if you need real accuracy
If you are doing this for mapping, visualization, or any reason beyond novelty, use a proper geospatial library instead of a batch file. GeoPy in Python or the geocoder package will handle coordinate systems, datum shifts, and decimal precision without any manual math on your part. The batch file version is fine for a quick laugh. It is not fine if you are building something that other people depend on.
Where To Get It
The original Dig To China batch file has been around since the early internet and you can find archived copies on sites like The Old School Electronics, various DOS hobby forums, and GitHub repositories that host classic batch utilities. I do not have a direct link to an official download page because there is no single official source. It is public domain by now. If you search for "digtochina.bat download" or "antipode calculator batch file" you will find working copies within the first few results. The code is short enough that you could also just rewrite it from scratch in a few minutes if you prefer not to trust random files from the internet.
