Uses fixed-point math to properly calculate the exact amount of space needed.