There are several different styles of toilets, but the most common are floor-mounted models. These come in two main types: skirted and non-skirted.
Non-skirted toilets make it relatively easy to determine the rough-in dimension. Simply measure from the wall (not the baseboard or trim) to the center of the toilet bolts or the bolt caps. You’ll typically get a measurement of 10", 12", or 14", with 12" being the most common.
Skirted toilets, on the other hand, can be more difficult to measure. In some cases, the toilet must be removed to accurately determine the rough-in. Additionally, skirted models often vary in base width, and some may require the water supply line to be relocated to fit the new footprint properly.