Joint share = 1 - (tile length x tile width) / ((tile length + joint width) x (tile width + joint width)). In this formula, tile length is the long side of one tile, tile width is the short side, and joint width is the gap between tiles. Grout weight = joint share x tiled area x joint depth x grout density.
Picture one tile plus the joint on two of its sides. That repeating cell covers (length + joint) by (width + joint), the tile itself covers length by width, and everything in the cell that is not tile is grout. The calculator turns that joint share into a volume with your area and depth, then into a weight with the density for your grout type. Densities are approximate and vary by manufacturer: sanded grout sits near 1.6 kg per liter, unsanded near 1.5, and epoxy near 1.8.
Worked Example
Here is the full arithmetic for 300 mm square tiles, 8 mm thick, with 3 mm joints over 10 sq m, using sanded grout with a 10% waste allowance.
First the joint share: 1 - (300 x 300) / (303 x 303) = 1 - 0.98030 = 0.019704, so about 1.97% of the surface is joint. Then the joint volume: 0.019704 x 10 sq m x 0.008 m = 0.0015763 cubic m, which is 1.58 liters. Then the grout weight: 1.58 L x 1.6 kg/L = 2.52 kg. With 10% waste: 2.52 x 1.10 = 2.77 kg, or about 2.8 kg. Type these numbers into the calculator above to check the arithmetic yourself. If you are pouring a solid mortar bed rather than filling joints, the concrete calculator handles volume by length, width, and depth.