When you shop for a car, you’re going to see them: EPA fuel economy ratings. New cars, trucks and SUVs sold in the U.S. are required to have labels showing, among other information, how many miles per gallon they get, how much owners can expect to spend on fuel each year, and how the fuel economy compares to similar vehicles.  

[The 10 Cars With the Best EPA Fuel Economy Ratings]

Although a new car’s sticker tells consumers what they want to know about a car’s gas mileage, it doesn’t explain how those fuel economy numbers are calculated or reported. For that, we have to turn to the U.S. Environmental Protection Agency, which is charged with regulating the labelling requirements and contents. The EPA testing is done at the National Vehicle and Fuel Emissions Laboratory in Ann Arbor, Michigan.

(Getty/Tom Merton)

For the EPA fuel economy ratings, vehicles are put through a battery of tests designed to reflect real-world driving patterns, but in a controlled environment, where engineers don’t have to worry about factors like unpredictable weather or temperature changes. In the lab, each vehicle is on a dynamometer, which is a sort of treadmill for cars. This allows engineers to “drive” the cars and trucks somewhat like the way you’d run on a treadmill for exercise. Following that analogy, the EPA tracks the amount of gasoline used up just as an athlete might focus on calories being burned. However, the agency runs every one of its vehicles through five different testing scenarios to help replicate different kinds of driving styles and conditions.

[The 9 SUVs With the Best EPA Fuel Economy Ratings]

The city driving test scenario was developed to represent what happens when a vehicle is operated in stop-and-go, commuter-style traffic conditions, and it begins with a car being cold-started on the dynamometer. The vehicle is put through its paces for about 30 minutes, accelerating on the machine’s rollers to more than 55 mph, coming to a complete stop, and once again getting up to speed, until more than 10 miles are “driven.” The EPA’s other dynamometer sessions include scenarios for highway cruising, high-speed driving, city driving with the air conditioner on and the temperature around the car at 95 degrees and cold weather driving, in which the temperature around the car is 20 degrees.

The EPA calculates the ratings you see on the vehicle sticker by using the high-speed and extreme-climate tests to adjust the raw scores from the highway and city evaluations. Next, it derives the combined miles-per-gallon rating by assuming a 55/45 split in highway/city fuel-efficiency performance.

While the EPA does indeed spend this kind of significant effort to rate every vehicle it tests, it doesn’t test every vehicle it rates. The vast majority of today’s cars and trucks – some 85 to 90 percent of them – are tested by the manufacturers themselves, who then provide the results to the agency; the EPA spot-checks the process by randomly selecting a small percentage of vehicles for its own in-lab testing.

It’s also worth noting that if an automaker has two (or more) vehicles in the same weight class, with the same basic engine and transmission, only one has to be tested and each will show the same ratings.

Even though the EPA continues to work to make fuel economy ratings more accurate, it’s just not possible to account for everyone’s differing driving styles or the wide span of climate and road conditions that folks can encounter in their everyday travel. They all can have a serious impact on fuel efficiency. For example, testing is done as if the vehicles were driven on flat ground; driving in the mountains or going up and down hills likely will decrease observed fuel economy ratings. The EPA ratings thus are often better for making comparisons between vehicles, because the grades indicate how two different cars or trucks performed while under nearly identical conditions.

Though they aren’t perfect, according to recent research, those EPA marks may be a lot closer to their real-world results than you’d think. This June, the American Automobile Association released a fact sheet about the self-reported fuel economy results car owners can post on the EPA website. The study found that 81.8 percent of the drivers said they had exceeded the EPA ratings of their vehicles, with vehicles with manual transmissions resulting in 17 percent higher results, on average, and those with automatic gearboxes responsible for a 7 percent average bonus over official ratings.

The difference in EPA ratings and real-world fuel economy goes the other way as well, however. Turbocharged engines have become more and more common in recent years as a way to provide more power without, in theory, sacrificing fuel economy. But according to the AAA fact sheet, trucks equipped with a turbocharged V6 engine deliver 9 percent lower fuel economy than their EPA ratings, and sedans with four-cylinder turbos returned fuel-efficiency results that were 4 percent lower than their EPA counterparts.

Ready to buy a new car? Check out the U.S. News Best Price Program for guaranteed savings on a new car, truck or SUV. Also, be sure to follow us on Twitter and Facebook.