Having a spotless driving record doesn't guarantee you will receive a low car insurance rate. While your driving history matters, the car you drive also matters — and it can affect your rates more than you may think.

Your car insurance rate is based on a number of factors that help determine the risk presented by you and your vehicle. If you want to keep the cost of your car insurance down, you will want to pay attention to these things when you search for your next ride.

Car value

Rates are based on your car's value, said Jacki Frank, president of operations at Tri-County Agency of Brick Insurance in Brick, N.J. The more expensive your car is, the more it'll cost to repair or replace it.

That's why new cars and sports, electric and luxury vehicles tend to cost more to insure. Frank said they often have additional features such as custom paint jobs, hiking up the price of the car — and your insurance bill.

Safety records

Your car's safety record can also affect your rates. A car that is better at avoiding crashes and protecting its passengers generally means fewer and cheaper insurance claims.

Carriers also look at how frequently claims are filed for each car model. For example, sports cars tend to attract young drivers, who are more likely to get into crashes than older adults, according to the Insurance Institute for Highway Safety. As a result, insurance prices are often higher for these kinds of vehicles.

Looking for a safe car that's also budget-friendly? The Subaru Outback, a 2020-21 IIHS top safety pick for midsize cars, topped NerdWallet's analysis of the cheapest cars to insure among 2020s 25 most-popular vehicles.

High-tech features

Many of the extra features drivers are accustomed to, such as heated seats and blind-spot monitoring, increase your safety and comfort — but at a cost.

Frank said the price of repairs — and claims — can skyrocket when your car is equipped with the latest gadgets.

"A windshield replacement on a vehicle that has the advanced driver-assistance systems in them can cost three times as much as a regular windshield," she says.

This is why owning a car decked out with safety equipment doesn't always guarantee lower insurance rates. Although these features generally mean fewer crashes and thus fewer claims, the savings can be offset by the cost of repairing or replacing these features, which can drive up the cost of insurance.

Likelihood of theft

Cars that are likely to be stolen can hike your insurance rates. That's because carriers are on the hook to pay for the current value of the stolen vehicle if you have comprehensive insurance. This optional coverage also pays for damage from hitting an animal, vandalism, floods and other natural disasters.

Engine size

A car's engine size regulates how fast you can drive. The higher the horsepower, the easier it is to speed — and to get into a crash.

Engine sizes often differ based on the version of the car model, also known as the trim level. Consider choosing a trim level with a smaller engine if you want lower rates.

One thing that doesn't directly affect your rates? Car color. Although red vehicles are often thought to be associated with higher insurance costs, color is one factor carriers don't look at, according to Frank. Still, the color of your car could affect its overall price, which insurers do take into account.

Other ways to save

You may still be able to find cheaper car insurance rates, even if you aren't looking for a new car. Because every carrier uses a unique formula to determine your rate, the one you choose can make a big effect on your wallet. In fact, comparing car insurance rates could save you hundreds of dollars a year.

"Rates are so different from one carrier to the next that you really need to shop your insurance," Frank said.

In addition, no matter what car you drive, you can lower your costs by avoiding tickets and crashes, she said. You can also earn car insurance discounts by bundling coverage or paying for the entire six-month or one-year policy upfront rather than paying monthly.

"Even if it's a luxury vehicle, it doesn't necessarily have to cost you an arm and a leg for insurance if you do all those other things," Frank says.

Kayda Norman writes for NerdWallet. E-mail: knorman@nerdwallet.com.