Uber got a slammed for doubling prices during Hurricane Sandy in 2012. But the ridesharing start-up doesn’t just raise prices during natural disasters.

Prices skyrocket on holidays. One New York Times reporter paid $47 for a two-mile trip in the wee hours of New Year’s Day in Washington, D.C., when Uber was charging 2.5 times its normal fare. On Twitter, other users angrily reported paying more than $300.

Uber’s fares fluctuate based on demand. The company, which lets users order a ride with a smartphone app, says surge pricing is necessary to encourage more drivers to pick up passengers when demand is high. But when prices got really high, users accused Uber of price-gouging.

So did New York Attorney General Eric Schneiderman. According to Schneiderman, Uber’s pricing policy ran afoul of a 1979 anti-price-gouging law put in place after heating oil prices went up.

On Tuesday, Uber and the attorney general reached an agreement limiting how much the company can charge in emergencies. Uber said it will implement the policy around the country, even in places that don’t have laws like New York’s.

The agreement reads like a math word problem on the SAT. Get out your pencils:

The three highest prices set for UberX in New York City on three different days during the sixty days preceding the commencement of an abnormal disruption of the market were 4.5X, 4.5X and 3.25X. The next highest price set on a day other than the days on which the three highest prices were set was 2.5X.
The price cap would be 2.5 X. The three highest prices set on different days, 4.5X, 4.5X and 3.25X, are excluded. The next highest price set on a day other than the days on which the three highest prices were set, 2.5X, would be the price cap.

What it means in plain English: Uber can still overcharge you on New Year’s Eve, but not during a natural disaster. The price cap only kicks in for “abnormal disruptions of the market” that New York law defines as natural disasters, not a surplus of drunken revelers looking to get home. And the cap has to be below the price on the three most expensive non-emergency days during the preceding two months.

Uber said Tuesday that it would donate its commissions — 20 percent of each fare — from surge trips during emergencies to the American Red Cross.

While the new surge policy won’t keep prices low on holidays, competition might.

Lyft, another rideshare start-up, announced Tuesday it will open for business on Friday in New York’s outer boroughs of Queens and Brooklyn, where transportation options are more limited than in Manhattan. Uber announced Monday it would temporarily cut prices by 20 percent, perhaps in a move to preserve its slice of the Big Apple pie.

Lyft has already more than doubled the number of cities it serves in the United States this year.

However, Uber’s founder, Travis Kalanick, said he isn’t worried about the competition. He told the Financial Times in May: “We launched in 100 cities so they have to do something, and there’s a lot of places on that list I’m not sure I’d call a city – but they’ve got to do what they’ve got to do,” he says. “In the U.S., in many ways, the table is set. We’re 10 times bigger.”