With the global chip shortage continuing to muck up automotive supply chains and vehicle prices at record levels, consumers looking for a new set of wheels have a lot to consider.

“I always say don’t get stuck with a ‘new-car only’ or ‘used-car only’ buyer mentality,” says Ivan Drury, an automotive analyst at the car-shopping website Edmunds.com. “Depending on the market and your situation, the best deal could be the opposite of an outdated paradigm.”

Some consumers are finding that their used vehicles are worth thousands of dollars more than what they had paid. Others have decided to buy their leased vehicles rather than risk not being able to find one comparable in size or price.

If you have a car that is financed—whether it is a loan or a lease—it likely has positive equity, granting you leverage in negotiating with dealers who are eager to fill their lots.

Here’s what you need to consider to calculate which option is right for you.

What’s your budget?

Leasing a vehicle typically means lower monthly payments because you’re paying for the car’s expected depreciation with interest and fees. On the other hand, you won’t own the vehicle at the end of your lease.

Cars aren’t depreciating at the rate they did before the pandemic. That means you should factor into your budget an extra 30% to 40% if you’re thinking of buying, says Mr. Drury.

Be sure to consider the long-term costs. If you have the standard 20% down payment and will need a car, calculate how much it would cost to lease or buy including interest and fees. Start your decision process there, and be aware of the length of the loan. Some auto loans last as long as seven years, lowering monthly payments but dramatically increasing the total cost of a vehicle.

“Do the math, and figure out what that actually means,” says Stephanie Brinley, principal auto analyst at IHS Markit, a forecasting firm. “It really does come down to you and your personal finances and your personal situation and your personal vehicle needs.”

Make sure you negotiate

Negotiating terms that are affordable to you is crucial.

Prices for new vehicles are up 16% from last August, and used vehicles are up 20%, says Tyson Jominy, vice president of data and analytics at the research firm J.D. Power.

In addition, there has been a pullback in leasing offers. According to IHS Markit, the share of leases is currently 26%, down from nearly 30% in June.

“Leasing always can be a good deal, and it always can be a really bad deal,” Ms. Brinley says. “If you’re not paying attention to the interest rates, then it can get high.”

Things to consider for leasing

Interest rates for leasing are still relatively low. In a comparison of July dealership transactions conducted by Edmunds.com, the average annual percentage rate (APR) for car leases was 3%, compared with 4.5% for dealership financing of a new vehicle and 6.6% for used vehicles from the 2018 model year.

Prices for new vehicles are up from last August, according to J.D. Power.

Photo: David Paul Morris/Bloomberg News

Because the cost of a lease is based on the difference between the vehicle’s retail price and the expected value at the end of the lease, plus interest, leasing a car right now could be financially advantageous for consumers.

Mr. Drury says that if you find dealer- or auto-maker-backed incentives—such as a minimal APR or a discounted down payment—leasing is a smart option until the chip shortage ends. Buying a vehicle in the current market means risking “a lot of depreciation on your hands,” he says.

He adds: “It’s like you’re paying too much on the front end, but when you try to recoup any of that later on in the sales/trade-in process, you’re not going to get it.”

The kind of car you want matters

It can be harder now to find sedans than sport-utility vehicles, since car makers have focused on producing SUVs because of consumer demand, says Ms. Brinley.

Some SUVs have high residual value for a longer period, so manufacturers hesitate to lease them in large numbers, says Mr. Jominy. Included are popular models such as the Jeep Wrangler and the Toyota 4Runner.

If you’re looking to lease a luxury vehicle, you’re more likely to find dealer incentives, says Mr. Drury. Luxury-vehicle lessees have a propensity for hopping from the hottest model to the next new thing, he says, and dealerships make it easy to do so. For example, 47% of new luxury sedans were leased in July, according to Edmunds.com.

Do you already have a car or a lease?

If you already have a lease and are happy with the vehicle you have, consider rolling the equity forward or buying out the lease.

“It’s like you’re buying a used car, but you know the previous owner really well, because it’s you,” says Mr. Jominy.

Share Your Thoughts

What have you found to be the best method to get a new set of wheels? Join the conversation below.

For car owners who have been primarily working from home, buying at the end of a lease could equal extra value because of reduced driving. For example, if you have only 8,000 miles driven at the end of a 36-month lease that is estimated at 30,000 miles, the contracted residual value of your vehicle would be lower than what the vehicle is currently worth.

“It creates an interesting situation where I, with my contract, can purchase that vehicle for the expected residual value price, like $26,000, but it could be worth $35,000 or $40,000,” says Kevin Roberts, director of industry insights and analytics at CarGurus, a vehicle-research and shopping site.

From there, Mr. Roberts says you could purchase the vehicle and sell it or work with a dealer to get the equity into another vehicle purchase or another lease. Be sure to check your lease contract to find out if your agreement contains any buyout fees, he adds, such as an early-termination or purchase-option charge.

How often do you expect to drive?

If you’ve decided to lease a vehicle, make sure you read the fine print. If you know you will go over the contracted mileage limit, do the math again on whether the extra cost to increase the limit or pay the penalty makes leasing the less attractive option.

The global chip shortage has helped to disrupt automotive supply chains and reduce dealer inventory.

Photo: David Paul Morris/Bloomberg News

Consumers looking at leases should “think pretty hard about what their work situation might be like in the next three years,” says Mr. Jominy. He adds that during the pandemic the standard yearly limit of 12,000 miles for most leases has dropped to 10,000.

“I would caution about these ultrashort leases that most consumers are now getting, probably believing that they’re not going to be driving very much for the next three years, and that’s a really long time,” Mr. Jominy says.

Write to J.J. McCorvey at jj.mccorvey@wsj.com