D.C.-area traffic ranks 18th most congested in the world, according to a new study using GPS data from connected cars and smartphones.

WASHINGTON — Drivers stuck in notoriously congested traffic in and around the nation’s capital can take comfort in a new study that shows things could be worse.

D.C. area traffic is the 18th most congested in the world, according to the 2017 score card by INRIX transportation analytics.

The study combines anonymous GPS data from connected cars and smartphones with other information, including construction and road closures.

Not surprisingly, the most congested traffic in our area is during the morning and afternoon/evening commutes, when drivers are in congestion 23 percent of the time, on roads into and out of D.C.

Factoring in typically less busy non-peak weekday hours and weekends, D.C. area drivers are in congestion 11 percent of all time spent behind the wheel, according to INRIX.

Los Angeles is again the most congested city in the study, with Moscow, New York City, Sao Paulo and San Francisco rounding out the top five.

Other American cities with more congestion than the D.C. area are Atlanta (10) and Miami (14).

On the upside, last year area traffic ranked three spots worse, at 15.