Financial experts offer wildly different advice on how much you should spend on a car. One school of thought holds that all your automotive expenses (gas, insurance, car payments) should not exceed 20 percent of your pretax monthly income.

Other experts say you should find a car that costs roughly half of your annual take-home pay. Then there are some frugal personal-finance gurus who say you should spend between 10 and 15 percent of your annual income on a car purchase. Pretax, post-tax, annual income: Where to begin? What is the right amount?

Take a few minutes to calculate your budget by seeing how much you have left over after you've paid your major bills and expenses.

Edmunds visitors save an average of $2879 off their new car. How much can you save?

The 15 Percent Car Payment

Our short answer is that your car payment should be no more than 15 percent of your monthly take-home pay. If you're leasing, it should be no more than 10 percent. But those figures don't capture the entire picture of what you will be spending. You should plan on about another 8 percent of take-home pay for two other important expenses: fuel and insurance. More about that in a minute.

Calculate Your Car-Buying Budget

First of all, take a few minutes to think about your finances, starting with your paycheck. What is your pay after taxes? Write down that amount. What's left after you account for rent or mortgage, bills, food, savings and entertainment? Not much? We know that feeling. New cars have gotten more expensive over the years and our salaries haven't kept up. What you actually have to spend might be less than 15 percent of your take-home pay.

In any case, you now know what you can afford to spend. Enter that figure, or whatever you feel comfortable paying, in the Edmunds Affordability Calculator. After you enter a few other numbers, the calculator should give you an estimated price range for your purchase, along with a list of vehicles that fall within it.

If you don't like the cars or the price range the calculator shows you, consider buying a used car. You also could lease a new car. Both options will allow you to get a nicer or better-optioned car for less money.

An Average New-Car Buyer's Scenario

To make this budgeting less abstract, let's look at a real-world example. The median U.S. household income in 2015 was $56,516, according to the U.S. Census Bureau. After taxes, this would translate to a monthly income of about $3,532 for a car buyer whom we'll call "Leo." If we follow our 15 percent rule, Leo would have a monthly car budget of $529.

Leo is an average guy. He's found a new car that costs $34,067, which is the average new vehicle price in 2016. He's making the average 10 percent down payment: $3,407. His monthly car payment will be $508 because he's opted for the average car loan, which will take him roughly six years to pay off. Does $3,407 down and $508 a month sound expensive? Just wait: We haven't yet factored in those fuel and insurance costs, which is something a lot of buyers fail to do when they're setting their monthly car budget.

Two Key Car Expenses

Fuel and insurance costs vary considerably, based on where you live and the vehicle you've chosen, but you shouldn't overlook them. Knowing these costs can often help you make an educated decision if you're considering multiple vehicles. Some may cost more to fuel up; others might have a higher cost to insure.

Based on a few scenarios we've run, a rough estimate for these expenses would be about 8 percent of monthly take-home pay. If Leo shopped at the top of his car budget without considering insurance and fuel costs, his total automotive expenses would be about $792 per month, or 22 percent of his monthly income.

Some people might be OK with spending nearly a quarter of their take-home pay on car ownership. But for those who have other bills piling up, it might make new-car buying a real challenge.

The Used-Car Option

What would the payment look like if Leo bought a used car? For starters, he'd be spending much less on the car itself. The average price of a used car is about $19,189. His down payment would be about 10 percent ($1,918). His monthly payment would be $379 and it would take him about 67 months to pay it off. That's right: The average used-car loan these days is more than five and a half years. He'd also have to contend with an interest rate that's 4 percentage points higher than that of a new-car loan. That's typical for used-car lending.

His fuel costs would be roughly the same. Insurance would be slightly less because the car is used. This insurance saving, though, would likely be offset by the maintenance he could expect to pay for an older vehicle. Let's call it a wash and assume the same 8 percent estimate for insurance and fuel.

Going the used route, Leo would be spending $663 a month, or about 19 percent of his monthly income. On its face, this would seem to be the most cost-effective purchase since Leo is taking out a smaller loan.

But it's also taking him five and a half years to pay off the loan, at which point the car would be 8 or 9 years old. How much longer will he want to drive that car? The whole point of financing a car is to eventually be free of a car payment, and if Leo buys another car as soon as he's paid off the old one, he might as well be leasing. Which brings us to our next option.

The Lease Option

The average lease payment in 2016 was $432. But this isn't what Leo would have to pay. Since most luxury vehicles are leased, they drive up the average. Instead, let's say he's considering a $34,000 non-luxury, top-of-the-line midsize sedan. We found a lease for a car like this for a monthly payment of $315 with $2,315 due at signing. There was another offer for $355 a month, with only the first payment of $355 due at signing.

Leo doesn't want to put down $2,315, so he goes with the second lease. When we factor in 8 percent of his take-home pay for fuel and insurance costs, he'd be spending about $639 per month on this car, which would be about 18 percent of his monthly income.

In this scenario, he'd be paying less per month for a leased new car than he would for a used car. He'd have more in his pocket because of the smaller down payment. That said, Leo would have to start the process over in three years when the lease is up. But that's not necessarily a bad thing: He'd have spent those three years in a new car rather than six years in a used one.

What's the Best Option?

There's a case to be made for each of these approaches. If you plan to buy a car and keep it for years, finance a new car. If you want to own a car but you can't quite swing the new-car payments, buy used.

If you want to have the least impact to your monthly budget and want to drive a new car every three years or so, consider leasing. The most important things are to know your budget and realize there is more to owning a car than just that monthly payment.