Measuring a hubcap is not nearly as straightforward a process as you might think. In fact, it is generally ill-advised to measure your hubcap since it typically results in the wrong size. The correct size of a hubcap comes from the information on your tire's sidewall, in the series of letters and numbers in large print that dwarfs all the other numbers. If you are curious, take a tape measure out and you'll probably find the measurement is at least an inch larger than the size specified on the tire.
Look at the tire on which the hubcap is attached.
Read the lettering that looks something like: 255/45 R17. This is printed in big letters around the sidewall of the tire, usually in the very center.
Look at the last number, usually preceded by an "R." This is the the size of the hubcap in inches, which corresponds to the diameter of the tire's rim.