Blocks to chunks
A chunk is 16 by 16 blocks and runs the full height of the world. Its X is the block's X divided by 16 and rounded down, toward negative infinity, and the same for Z. So block 15 is in chunk 0, block 16 in chunk 1, and block −1 in chunk −1, not 0: chunk −1 covers blocks −16 to −1. Inside the chunk, the block's place is 0 to 15 from the north-west corner, the corner with the lowest X and Z. Put in a Y to get the 16-block-high section too. The debug screen (F3) shows the same numbers. Checked against Java Edition 26.3.
Region files
Java Edition saves the world in region files of 32 by 32 chunks, 512 by 512 blocks, named r.X.Z.mca after the chunk X and Z divided by 32 and rounded down. They sit in the world's region folder (the Nether's in DIM-1/region, the End's in DIM1/region), with matching files under entities and poi. Each file starts with a table of 1,024 four-byte entries, one per chunk, X first: the chunk's entry is (X mod 32) + (Z mod 32) × 32, and its last-saved time is 4,096 bytes further on. Deleting a region file, with the game closed, makes its 512 by 512 blocks generate fresh next time. Bedrock Edition keeps the whole world in one database instead, so it has no region files, but its chunks are the same.
Spawn chunks
Java Edition 1.21.9 removed spawn chunks: in 1.21.9 and later, 26.x included, nothing stays loaded around the world spawn. Chunks stay loaded near players, while something goes through a portal, near a thrown ender pearl, and where /forceload says. Before that, the area around spawn was always loaded, its size set by the spawnChunkRadius game rule from 1.20.5. Bedrock Edition does not keep spawn loaded either; it uses ticking areas instead. The command beside the grid keeps the chosen chunk loaded.
The Nether
One block in the Nether is 8 in the Overworld, so an Overworld block's Nether match is its X and Z divided by 8 and rounded down, and one Nether chunk covers 8 by 8 Overworld chunks. The Nether Portal Calculator works out where portals land and whether they link.
Questions
Why is block −1 in chunk −1 and not chunk 0?
Because the game rounds down, not toward zero: −1 ÷ 16 is −0.0625, which rounds down to −1. Chunk 0 runs from block 0 to 15 and chunk −1 from −16 to −1, so every chunk is the same 16 blocks wide.
How do I see chunk borders in the game?
In Java Edition, press F3 + G. The lines are the same chunk edges the grid here shows. Bedrock Edition has no key for it.
Which region file is my base in?
Put in the base's X and Z and read the file name. To be safe when trimming a world, back it up first, close the game, and keep the files around anything you built.
Can I paste coordinates?
Yes. Paste the line F3 + C copies, or three numbers like 120 64 -340, into the X box and it fills in X, Y and Z. In region mode, paste a file name like r.-1.2.mca.
Does it save anything?
No. Nothing is stored and nothing is sent anywhere. The position is kept in the page's address, so a copied link opens the same spot.