How light works, in one formula
Every light source has a strength (torch 14, lantern 15) and light drops by 1 per block of distance. A hostile mob needs light level 0 to spawn — so your job is making sure no floor tile is more than (strength − 1) blocks from the nearest source. The calculator runs that grid math for your spacing.
Spacing rules of thumb
With torches (strength 14), spacing of 12 blocks or less keeps the darkest point at level 2 or higher. Lanterns (15) buy you one more block. For wall-mounted torches remember height counts as distance too — a torch 2 blocks up reaches 2 fewer floor tiles.
From calculator to build
Walk the perimeter counting blocks between planned torches before placing anything — reworking a torch grid after the floor is done is the classic wasted evening. Pair this with our light level & mob spawning guide for the spawning rules, and the XP calculator if you are lighting a mob farm’s kill floor instead.