The previous replies are correct, but I'd add a tad more information. You can also measure from the finished wall to the center of the drain. It's the same as measuring to the bolts. Another point you might want to know about is that the actual space required to fit will often vary from toilet to toilet, even within the same brand. Fortunately, none that I have ever heard of use more than the rough-in distance they are rated at, but some take less. So, if your measurement shows say 11", it is likely that many toilets rated as 12" will fit. I have a Toto Dartmouth that supposedly needs a 12" rough-in, but my flange is exactly 12" and the Dartmouth tank is almost 2" from the wall!