Retail giant Costco is settling a lawsuit involving so-called "hot gasoline," agreeing to remedy a problem that lets consumers drive off with less fuel in their tank than they realize.

The suit alleges that temperature changes in gasoline cause it to expand and lose mass, thereby leaving consumers with less gas in their tank than they are actually charged for.

The standard industry-wide temperature for gasoline is 60 degrees; indeed, pumps are generally programmed to deliver gas at this temperature. But when gas gets hotter, it expands and loses mass, meaning that a "full" tank isn't really full at all.

The suit covers individuals in 25 states, Washington, D.C., and Guam, and alleges fraud and conspiracy against the oil industry and individual gas stations. While the difference in volume might not seem significant, over time the money adds up, and the plaintiffs attorneys estimate that affected individuals pay an additional $40 to $100 a year to make up the difference.

As part of the settlement, Costco has agreed to install new pumps at stores in 14 states in the south and southwest. The new pumps regulate fuel by delivering slightly more gas for the same price when the fuel is "hot." The new pumps could eventually find their way to seven other states and Washington, D.C., if Costco begins buying temperature-adjusted fuel in those markets. Assuming the settlement is approved, the new pumps will be up and running within the next five years.

Trade groups that represent petroleum makers seized on a report that claimed the new pumps would actually cost consumers more money. The study, commissioned by the California Energy Commission (CEC) found that the "net cost to society" of installing price-control mechanisms on pumps "is slightly negative." The report's findings are based on an estimate that modifying fuel pumps in California would cost between $102 and $123 million, and that yearly inspections and maintenance on the equipment could range between $4.4 million and $13 million.

Nonetheless, some industry experts estimate that heat expansion creates a windfall for the oil industry and gas retailers of up to $1.5 billion a year. Retailers also insist that they must sell gas at 231 cubic inches, the industry standard, and that using the new pumps will essentially be illegal. U.S. District Judge Kathryn Vratil of Kansas City dismissed that argument out of hand.

Indeed, in a previous order, the judge said that the defendants had "not shown ... that state regulation actually prohibits them from adjusting the size of a gallon of motor fuel to account for thermal expansion."

Consumer groups were thrilled with the settlement. "This is fantastic news for consumers," said Judy Dugan of the nonprofit Watchdog organization, in a statement. "Costco is taking the lead in offering drivers gasoline that has the same amount of energy in every gallon, living up to its reputation as a consumer-friendly place to shop."

Maybe so, but the fuel and oil industry isn't giving up without a fight. They will no doubt be vociferously opposing possible settlements with other gas station chains; the suit names dozens of gas retailers and chains, including Exxon, Citgo, Hess, and Wal-Mart. In a sign of their stake in the actions outcome, the oil and gas lobby succeeded this month in convincing the Virginia legislature to ban temperature-adjusted sales, at least for the time being.