How do I tell if I'm in the 20 main chunks?

The 20 chunks around the origin of the world are always loaded, whether you are there or not. This makes them a great place to build farms. Is there a way to tell if you are in those 20 chunks or not?
I'm fine with using the debug menu but I'd prefer to avoid having to count chunk borders or something if possible.


Solution 1:

The spawn chunks usually consist of an area of 16×16 chunks centered as close as possible to the world spawn point.
A compass will point to the spawn point.

For players not connected to a bed, in Creative and Survival mode, players spawn on a random block in a 20×20 box centered on the spawn point. The spawn point can be inferred by repeatedly respawning and keeping track of the smallest rectangle encompassing all blocks players have spawned on so far.

And since chunks are 16 × 16 segments of the Minecraft worlds, once you know the spawn point coordinates you can easily find the spawn chunks bounds with math.

Source, Minecraft wiki.