Enter the area size, tile size, grout gap and waste allowance, and get the tiles needed along each side, the total including waste, and tiles per square foot.
Spacing changes the tile count because the grout gap adds to the footprint each tile occupies: a 12 in tile with a 1/8 in gap covers the floor in steps of 12.125 in, called the effective pitch here. Tiles along a side is the area dimension plus one gap, divided by the effective pitch, rounded up, since the last tile in a row covers the remaining space and is cut to fit. Tiles per square foot is 144 divided by the effective pitch in each direction, which is why wider gaps slightly reduce the number of tiles a given area takes. This is an estimate: borders, patterns laid diagonally, and features such as niches or drains change cuts and counts, and the waste allowance covers breakage and spares.
Why does the grout gap affect how many tiles are needed? Because each tile plus its share of the grout joint covers more area than the tile alone. Over a long wall the gaps add up to a meaningful fraction of a tile, so ignoring them overstates how many tiles fit and understates the count.
What grout gap is typical? Common choices are 1/16 in for rectified tiles with very straight edges, 1/8 in for many wall and floor tiles, and 3/16 to 1/4 in for rustic, handmade or large-format tiles with more size variation. The tile manufacturer recommendation governs for a specific tile.
How many spare tiles should be kept? The waste allowance, 10% by default, covers cuts and breakage during the job. Keeping a few unopened spares afterwards is worthwhile because a damaged tile years later may be impossible to match by batch and shade.