Minecraft Portal Calculator

Nether
X: 
Y: 
Z: 
-OR-
Overworld
X: 
Y: 
Z: 
-OR-
I love minecraft--it's way too much fun, and way too time consuming. Here's a quick calculator that you can use to plug in coordinates from either the overworld or the nether to find out where your gate is likely to appear given the other constraints the game's algorithm uses to determine where and how gates get hooked up. Or, said another way, where to build your portal in order to have it's other end materialize where you need it to.

Here are the specific scenarios which I am hoping to have this calculator easily solve.

Wrong Return Gate

I built a portal from my home at X,Y,Z only to land in someone else's portal room in the nether. This was fine, but when I walked back through it, my X and Z were nowhere near the gate I entered from--instead I came back to that someone elses homestead and then had to wander across the landscape, at night, a long, long way...it was a frightening journey. What I needed to do, was get my X,Y,Z coordinates before stepping through the original portal, and then carry in at least ten obsidian and some flint and steel. From the nether side, I needed to get to X/8, Y, Z/8 and then build a portal back to my original location. I know I know, this isn't new knowledge...I just hadn't seen the math clearly articulated at any of the pages produced by searches. What to do...?

Calculator to translate between the overworld and the nether

As a web developer with front end experience I figured, why not build a quick calculator to do the translation based on which side I was plugging the coords in from.

To use: