If you've played Minecraft Survival for a while, you've probably done this: built a Nether portal, walked through, built the return portal "roughly in the right place"… and ended up 400 blocks away from your base.
The rule is simple: 1 block in the Nether = 8 blocks in the Overworld. Doing that maths in your head while a ghast is shooting at you is not. So I built Portal Calc, a small browser extension that does it for you.
What it does
- Overworld ↔ Nether converter: type X, Y, Z and get the matching coordinates in the other dimension. Click the result to copy it.
- Distance calculator: straight-line and horizontal distance between two points, plus how far the trip is if you go through the Nether.
- Waypoints: save bases, portals and villages per dimension.
How it's built
It's intentionally boring tech, which is the point:
- Manifest V3, a single popup, no background script.
- Plain HTML, CSS and vanilla JavaScript. No framework, no build step, under 10 KB zipped.
- The only permission is
storage, used for waypoints viachrome.storage.local. - No network requests, no analytics.
The core conversion is one line each way:
const factor = direction === "o2n" ? 1 / 8 : 8; const nx = Math.floor(x * factor); const nz = Math.floor(z * factor); Math.floor matters here: Minecraft block coordinates round down, so using Math.round gives you the wrong block for negative values.
For the distance tab I show three numbers, because "how far is it" means different things when you're travelling:
const flat = Math.sqrt(dx * dx + dz * dz); // walking distance const full = Math.sqrt(dx * dx + dy * dy + dz * dz); // 3D distance const viaNether = flat / 8; // the shortcut One thing I learned from store review
Mozilla's add-on validator flagged my first upload for "Unsafe assignment to innerHTML", even though I was only inserting numbers. I rewrote the result rendering to use textContent and createElement, and the warning went away. If you're publishing an extension, build your DOM like that from the start and save yourself a resubmission.
Try it / read the code
- Source code (MIT): https://github.com/nimipakao/portal-calc
- I write Minecraft guides, version notes and survival tips over at theminecrftapkdl.com, which is where the idea for this tool came from.
If you play Minecraft and have ideas for the next feature (stronghold triangulation? slime chunk finder?), let me know in the comments.

