How Nether portals link up
The Nether is 8× smaller than the Overworld: one block travelled in the Nether covers eight blocks in the Overworld. To make a pair of portals connect, you convert the coordinates and build the second portal at the matching spot.
The maths
Overworld → Nether: divide X and Z by 8Nether → Overworld: multiply X and Z by 8Y (height) stays the same
For example, an Overworld portal at X 1000, Z −480 should pair with a Nether portal at X 125, Z −60. Build there and the two will link instead of spawning a new portal.
FAQ
Why did my portal link to the wrong place?
Minecraft links to the nearest existing portal within range. If two Overworld portals are close together in Nether coordinates they can share one Nether portal — space them out by at least 16 Nether blocks (128 Overworld blocks) to keep them separate.
Does Y matter?
Height isn’t scaled, but the game searches vertically for a portal, so keeping both portals at a similar Y helps them find each other cleanly.
Nether Portal Calculator