Measure from the wall (not the baseboard) to the bolts holding the toilet to the flange. That is the rough-in dimension. If that isn't either 10, 12, or 14", and the version of the toilet matches, then you can have a large gap behind, and therefore have it extend further from the wall than it needs to. The toilet doesn't 'need' a gap behind, but you do not want it touching the wall in case it is used a lot, and sweats...a little air circulation behind is good.
FWIW, older toilets tended to sweat lots more than the low-flush ones. On the low-flush ones, they generally don't empty the tank during the flush, so there's some room-temperature water to mix with the potentially cold incoming, often that will keep it above the dew point. Older ones, some may have used as much as 7-gallons or maybe more! tended to sweat a lot more as they did nearly empty each flush.
The diagrams on the spec sheets are only accurate for projection into the room when they are used on the designed rough-in, so knowing what yours really is, is required to see what you might gain.
Reach mentioned that you can often gain a bit by fudging the position of the toilet on the flange. The flange opening is at least 3" (unless it's an inside fit on a 3", which should be illegal IMHO), and the horn on the toilet opening is usually a little over 2", so you can offset things a little and not cause a restriction.