California is one of the best states for parents with teenage drivers.

That's according to a new WalletHub study. Researchers ranked all 50 states on teen-driving environment and placed California at No. 7 on the list.

Motor vehicle accidents are the leading cause of death in the U.S. for people aged 16 to 19 and is also the age group with the highest risk of crashes, according to WalletHub.

Teenagers between the ages of 15 to 19 only made up 7 percent of the population in 2013, according to the Centers of Disease Control and Prevention (CDC), but were responsible for 11 percent of all costs of vehicle accidents, not including cost of insurance premiums, traffic citations and other traffic incidents.

The research team looked at a number of different factors, including number of teen driver fatalities, share of teens texting while driving, maximum cost of speeding and red light tickets, and leniency of DUI violations.

California landed in the No. 5 spot for safety value.

New York took the top spot for the best state for teen drivers, followed by Oregon and Illinois. Montana is at the bottom of the list while Wyoming is just one spot above it.

Source: WalletHub