The measurement is based on the empty hull. Loaded rounds will be shorter due to the amount of the hull that gets folded into the crimp.
Even so, you'll probably find that if you measure an empty one it still isn't 3"....more like 2 7/8" if it's a domestic manufacturer. It varies from company to company and even from batch to batch. The new Winchester hulls are the most inconsistent that I've found. A real pain in the you-know-what on a progressive shotshell reloading machine.