Is your lease almost over? It’s a situation that should be exciting—because you can essentially lease your current car at this point with no penalty, nothing lost—but to some people the situation also breeds apprehension.

While some people lease purely on convenience, most people understand that they might or might not be fiscally sound depending on the situation. Are you doing what’s smartest?

To put it as simply as possible, you have three possibilities:

Walk away. You don’t have to be held captive by car payments. Maybe you’re consolidating vehicles; maybe you’re going to replace that leased vehicle with a lower-cost used car. You’re free of your financial obligation and you have options.

Buy the car you were leasing. You can buy the car at the agreed-upon price. There’s no haggling, so it’s a take-it-or-leave it deal that could be good or bad.

Lease a different car. One of the big benefits of leasing is that you get to drive a new vehicle every two or three years (or sometimes four). If your needs have changed, you could go with a completely different kind of vehicle.

Do your research, and run the numbers

Most leases issued today are "closed-end,” meaning the residual value is not subject to change once agreed upon, irrespective of changes in the marketplace. So, if you agree to a certain residual value at the time of the lease, you won’t be able to negotiate it in your favor at its end.

Leases are also rooted in prediction, so here’s where it pays to research the actual current value of your vehicle. Your payments are based on what lenders are advised—via a very well-developed industry—that the vehicle will be worth, on the wholesale market, when you bring it back at the end of the lease. That’s called the residual value, and it’s often called out as a percentage of the original MSRP.

Why it pays to research the actual private-party resale value (via a third-party site like Kelley Blue Book) is that these predicted values aren’t always on the mark. If the vehicle market has fundamentally changed since you leased your vehicle, you might find it particularly advantageous to buy your vehicle for the agreed-upon price and sell it privately.

Just a few years ago, for instance, when the combination of lagging economy and the federal government’s Cash for Clunkers program drove prices on used SUVs downward while small-car prices surged, some of those who were leasing a smaller, more efficient car suddenly found themselves in a place where they could make some money from their leased vehicle—or make a savvy purchase of a used car at below market value)—while those who were leasing an SUV, with a quick check of the numbers, were happy to just walk away from a vehicle that had depreciated far more than anticipated (and for which the purchase price would have been way above market value).

Provided the numbers do work out, there are other things that can work out in your favor. One is that you know the vehicle’s history. Unlike buying a used car, you won't be buying a pig in a poke — you’re the "first owner.”

If those numbers still leave you on the fence, here's some further general advice on what to do:

Consider the condition of the vehicle. If you’re thinking of turning the vehicle in and walking away, or getting a different leased vehicle, your car should be clean and free of damage, with only normal (light) wear and tear. You’ll have to go through a standard checklist, and you’ll have to pay for any repairs that need to be made, plus any penalties for going over the mileage you agreed on in the first place.

Tidy it up. If you're turning it in, clean it inside and out, removing stains, trash, dust and washing and waxing it, all to make it look as new as possible. If there is light to moderate damage, you will probably have to have it repaired, and may be able to fix it more inexpensively with your own body shop. Don’t forget, the car will be inspected by the dealer; if it looks as though it's been treated roughly, the dealer's inspector will be even more careful to look for problems and cosmetic damage.

Get with the program this time and understand your lease. If you decide to lease again because you were happy with how it worked out for you this time, know that it's all about the numbers on what you sign. Leasing contracts are very complex (take a look at our 10 Leasing Terms You Should Know) and it's easy to get sidetracked unless you really know the ins and outs — and it’s easy for salesmen to add in extra profit for themselves when you don’t agree on a price before figuring out the terms.

Negotiate price first, then consider leasing as a finance term. Unless you’re taking advantage of manufacturer-subsidized ‘captive’ lease deals (built on incentives, and often inflated residual values), it’s in your interest to do so based upon the total sale price of the vehicle, just as if you were buying it. Negotiate that bottom-line price, then work out your monthly lease payments based upon that. Do not fixate on the monthly payment: it is the most common mistake made by people not familiar with lease contracts. Salespeople will balk, but don't tell them you're buying or leasing until after you've negotiated a transaction price.

Leasing generally makes better cars available for a lower price. But it’s not without its caveats. As long as you’ve done the research, and turn in a clean, well-maintained vehicle, you’ll see the benefits much more clearly.