Many factors that affect how much you pay for car insurance, such as your driving history, are logical. But personal details like your relationship status, gender and neighborhood can also affect your rate. Here are five surprising factors that can influence what you pay:

Your gender

Many people assume that men pay more for car insurance because male drivers are more likely to get tickets and be in fatal crashes. And often, men, especially younger men, who are the most common drivers in fatal crashes, do pay higher premiums for car insurance.

But the Consumer Federation of America reports that some companies charge older men less than women in the same age groups in 10 cities.

Your relationship status

Being single costs you for better or worse, insurance companies consider you less risky once you are married because married people get in fewer crashes than singles. Even if you have been married before and aren't currently, putting "single" on your car insurance application probably means a higher rate.

Your location

In areas full of people — and their cars — the likelihood of colliding is higher, so insurers can justify charging higher car insurance rates in cities than in rural areas. Crimes like theft and vandalism are also more common in cities. And so is fraud, says Chris Salameh, vice president of sales at We Insure, a national insurance agency.

Your last insurer

Having been insured by a nonstandard insurer, one that typically covers high-risk drivers, can result in higher premiums at your next company, according to another CFA study. Some companies quoted car insurance rates 9 to 15 percent higher for drivers with perfect records if they were switching from a nonstandard insurer rather than a large insurer, the study found.

Your credit history

Good things come to those with good credit — including lower auto insurance rates. Meanwhile, insurers can jack up your insurance rates if you have bad credit, unless you live in California, Hawaii or Massachusetts, where the practice is prohibited. In the 47 states where it's legal, having poor credit can raise your rates even more than causing a crash.

NERDWALLET