Is it worth paying for a pricey repair on an old car with many miles on the odometer? That’s a question worth asking, especially when the repair estimate is above $1,000 and the odometer is above 150,000 miles. There’s nothing like a car that’s already paid for—it’s far and away the most cost-effective sort of vehicle to drive. But there’s little point pouring thousands of dollars into a car if it isn’t likely to give you many thousands more miles of relatively reliable service. At some point, it’s time to say good-bye.

Here are the steps to take to gauge whether your car has reached that point when it has a problem…

1. Ask your mechanic to provide a quote on the repair. Request that this quote be broken down into parts and labor. If parts are a major slice of the price, check whether you could save a significant amount by using one or more used parts rather than the new ones your mechanic probably intended to use. You can search online for suppliers of the parts that your mechanic says you need.

Used parts aren’t necessarily worse than new ones. They have some miles on them, but they’re typically the original manufacturer parts, while new replacement parts often are aftermarket parts that might not be made as well—the quality of aftermarket parts varies. Some used-part sellers even test and warranty their parts—this isn’t like the old days of heading down to the local salvage yard to pull parts off old cars yourself.

Warning: Do not buy used brake components, clutch components or a used fuel pump or water pump. These parts can wear out rapidly and could easily be on their last legs when you buy them. (And parts like these tend not to be offered with warranties.)

2. Look up how much cars like yours are selling for online. Sites where used-car prices can be found include Craigslist.comeBay MotorsEdmunds.com…and KBB.com. Search for cars that are as similar to yours as possible in model, year and mileage. Their condition should be comparable to the condition your car would be in if you paid for the needed repair.

It’s probably not wise to repair your car if you discover that you could purchase a very similar car for less than the price of the repair. (Remember that the prices you find online are likely to be asking prices—those cars probably could be purchased for at least a few hundred dollars less.)

If the repair price is fairly close to your car’s value, consider your car’s track ­record—if it has had a series of problems and you no longer trust it, it’s probably time to move on…but if the vehicle was largely trouble-free until it experienced its current problem, it might be worth paying for the repair—after weighing the issues raised below.

Tip: It’s more likely to be worth paying for a costly repair with a high-mileage full-size pickup truck than with a high-mileage car, SUV or small pickup. Full-size pickups tend to be built more solidly than other vehicles, so the odds are higher that if you repair the current problem, the truck will be able to provide many more miles of reliable service.

3. Check for additional problems (and pay your mechanic to do the same). Before you agree to a pricey repair on an old or high-mileage car, take a peek underneath. If you find significant rust on the frame or suspension, it’s probably not worth ­repairing—there’s a good chance that the car doesn’t have a lot of miles left in it. This is especially common in the northern US, where car-corroding salt is spread on icy ­winter roads.

Ask your mechanic to put the car up on a lift before you agree to the repair so that he/she can check for major rust problems, too, as well as any other issues that could point to additional costly repairs soon. Ask him to start the car to listen and look for potential issues (assuming that the car’s current problem does not preclude starting it). Sometimes mechanics will do basic inspections like these for free, particularly for longtime customers. If not, offer to pay the mechanic’s rate for a “used car inspection” on your own car. That’s typically one hour at the garage’s hourly rate, often $85 to $100, though potentially more at a dealership. It’s money well-spent before investing thousands of dollars in a repair.

If the mechanic finds additional issues, ask how much those repairs would cost. Add that figure to the current repair estimate, and compare the total to what cars like yours are selling for online.

Also: Consider the condition of the car’s tires (brakes, too). If they will need to be replaced soon, it could add hundreds of dollars to the price of keeping the car on the road. That might not be enough on its own to encourage you to move on from a car, but it could tip the balance if you’re facing a close call.

4. Factor in your larger financial picture, your driving needs and your current car’s fuel economy. Ask yourself these three questions if the repair-or-replace decision remains ­unclear…

Could you comfortably fit a monthly car payment into your budget or comfortably pay cash for a new (or reliable, low-mileage used) car? If upgrading to something significantly newer and more reliable would require a financial stretch, that’s a reason to lean toward keeping your current car on the road a bit longer. Keeping the old car might lead to additional budget-taxing repair bills…but replacing this car definitely will take a bite out of your tight budget.

Do you drive long distances and/or depend on your car to get you somewhere that you absolutely must go regularly, such as a job? If so, lean toward replacing the car with something newer and more reliable. On the other hand, if you use your car only for short trips and you have family members or friends you can rely on for rides when your car is in the shop, then future breakdowns might not be as big of a deal for you.

What’s your current car’s fuel economy? Fuel economy has improved dramatically in recent years. For example, the base model of the 2018 Toyota Camry, a spacious, safe and reliable midsize ­sedan, gets 41 miles per gallon (mpg) on the highway, and the hybrid version of that car gets 53 mpg. If your current car is a fuel hog in comparison, replacing it might save you enough money at the pump to make that the smart decision.