When shopping for toilets, the most important measurement is the rough-in, which is the distance between the wall behind the toilet and the center of the drainpipe or bolts that hold the toilet in place.
Standard rough-ins are 12 inches, but older homes may have 10- or 14-inch rough-ins, which require specialty toilets. Make sure you measure the vertical and horizontal space available so you can determine the size of your new toilet.