In its most recent assessment, the American Society of Civil Engineers gave the United States a failing grade for its infrastructure. According to the group, $3.6 trillion would be needed to raise the standard of America’s roads to acceptable levels before 2020.

To determine the states with the worst roads, 24/7 Wall St. reviewed statistics from the Federal Highway Administration. The worst roads are in Rhode Island, where 52% of major roadways are in poor condition. By contrast, less than 5% of the roads tested in Idaho are in need of repair, the lowest share of any state.

Driving on rough, damaged roads can be unpleasant, dangerous, and often leads to additional vehicle operating and repair costs, including flat tires and general tire wear, deterioration of a vehicle’s shock absorption, extra fuel costs, and so on. These additional costs are highest in New Jersey, where on average each motorist spends an extra $601 annually on vehicle operating and repair costs. Nationwide, roads in disrepair cost motorists an extra $66.6 billion, or $324 per motorist each year.

Bridges are another way to assess a state’s public road system. Nearly one in four bridges in America do not meet the standards set by the federal government. While the vast majority of these bridges are still safe to use, they must be monitored and eventually repaired or modernized. Travel on some are restricted to certain weight limits. States with more roads in poor condition tend to have a higher share of bridges that are deficient. Rhode Island, the state with the worst roads, also has the highest share of deficient bridges, at 56%.

9. Massachusetts

> Public roads in poor condition: 30.1% (9th highest)
> Deficient bridges: 52.2% (2nd highest)
> Added vehicle costs: $313 per motorist (19th highest)
> Size of road system: 76,873 lane-miles (11th smallest)

Geographical features and weather conditions can make road construction and maintenance much more challenging. It is both cheaper and easier to build and maintain roads in a flat state like Kansas than in neighboring mountainous Colorado. In states such as Wisconsin, road pavement expands and contracts due to large temperature differences in winter and summer. Because this expansion and contraction damages the pavement, extra maintenance costs are required — costs not required in states with more even temperatures.

To identify the states with the worst roads, 24/7 Wall St. reviewed pavement roughness data from the U.S. Federal Highway Administration’s 2014 Highway Statistics report. Also from the report are the share of deficient bridges and total lane-miles. The share of deficient bridges is the sum of bridges categorized as either structurally deficient or functionally obsolete. Extra vehicle operating and repair costs are from the American Society of Civil Engineers 2013 Report Card for America’s Infrastructure. Because 2014 pavement roughness data was unavailable for Massachusetts, 2013 data was used. All data is from the most recent period available.

Click here to see the states with the worst roads.