Cheap gas and a surging economy are taxing the nation’s roads and contributing to congestion that cost U.S. motorists almost $300 billion last year in wasted time and fuel, according to a new report.

Los Angeles had the worst traffic in the world among the 1,064 cities studied by transportation analytics firm INRIX. The average driver wasted 104 hours sitting in gridlock during the busiest commuting times last year, and lost $2,408 each in squandered fuel and productivity.

While Moscow had the second-worst congestion, New York and San Francisco weren't far behind. New York motorists spent 89 hours on average in traffic during peak periods last year. The average San Francisco driver cooled their heels behind the wheel 83 hours on average in 2016.

“Gas prices haven’t increased that much over the last year or two,’’ says Bob Pishue, senior economist at INRIX and a co-author of the traffic scorecard. Economic growth or productivity has also been strong in cities like San Francisco, Los Angeles and New York. “Those kinds of factors, combined with an already strained road network leads to increased congestion.’'

Even if the growing popularity of ride share services like Uber reverses the nation's decades-long decline in car pooling, the increasing amount of freight on the nation's roadways will still stoke gridlock.

"With an economic recovery ... the movement of goods also puts a lot of strain on the roads,'' Pishue says. "So even if people reduce their driving a little bit, freight is still increasing.''

Pishue says the study used federal metrics for the value of lost time and fuel, along with the environmental impact of carbon emissions to calculate the bottom-line costs to drivers and municipalities from motorists idling in traffic.

Getting stalled on New York’s crowded streets for instance cost drivers $2,533 each last year, and the city as a whole nearly $17 billion. Lost productivity and fuel cost San Francisco drivers $1,996, and the city more than $2.5 billion in 2016.

When freight carriers lose time and money in traffic, 90% of those costs "get pushed onto households through higher prices for goods and services'' Pishue says.

Some of the most congested municipalities are taking steps to get traffic moving, the report says. Los Angeles voters approved Measure M in November, a sweeping $120 billion plan aimed at updating transit infrastructure ranging from bike lanes to highways. San Francisco’s Smart I-80 corridor, which opened in September could be helping to keep traffic from worsening. And New York City is continuing to focus on expanding the new 2nd Avenue subway line which is expected to ultimately ferry more than 200,000 commuters a day.

"Those kinds of unique city challenges rely on big data, technology, (and) connectivity,'' Pishue says. "That's where these solutions lie, not necessarily in adding a lane to a big highway or building a big parking garage.''