There are all kinds of websites, platforms and startups that are supposed be “disrupting” the whole car buying process, yet every day people end up with bad deals. But the most powerful tool is something buyers have had for a while, and they don’t even have to download it.

It comes with pretty much every single smartphone, and has even existed in physical form for many, many years. It helps you do all sorts of calculations, from addition and subtraction to complex algebra.

It’s a calculator.

That’s right: the simple calculator is your first line of defense against a car deal that is either not competitive or will put you over your head when it comes to the payments.

Recently, our man Ryan Felton wrote up a fantastic investigative piece on an auto loan loophole in New York that legally allows dealers and lenders to charge astronomical interest rates to folks putting them in situations where the debt is absolutely crushing. It’s because it’s not a loan, but a “service contract”, even though they are effectively the same thing.

Here is an excerpt:

“Guerrero-Roa went to an auto dealer in Brooklyn to purchase a 2005 Lexus RX that was being advertised online for $6,900….What Guerrero-Roa didn’t realize was the transaction he’d signed off on actually required him to pay $18,998.40 for the car over 48 months.”

Don’t blame these folks, necessarily. The reason so many people get trapped by these outfits so often is because having a car is a crucial part of their financial survival, and if they lack the funds or the credit to get their car through a more legit means, they end up in places where the business model is built upon taking advantage of the desperate.

Obviously, these rules are intentionally predatory. But you can protect yourself.

If you find yourself in a similar situation, or even if you are buying a car from what seems like a legit establishment, the use of your calculator is key. Here is a quick way to find out if the deal is a bad one for you.

Take the monthly payment quoted to you and multiply it by the term of the loan. In the case of the gentleman above, he was purchasing a $6,900 used Lexus with payments that would have amounted to about $395 per month on a 48-month loan.

By multiplying $395 by 48 we get a total of $18,998. That is over twice the amount of the car!

Now that case was an extreme one, but even folks with good credit can get hooked into a raw deal if they don’t run the numbers. Not long ago I wrote a piece about dealers advertising prices without disclosing additional fees. Some friends of mine were shopping for a minivan and it had an advertised price of $14,995. But when the dealers pushed the papers on them they saw a payment of $283 per month on a 72-month loan that assumed a $3,000 down payment.

So they did what any smart buyer would do and got out their calculator and multiplied $283 by 72 to get a total of $20,376. Then they added that $3,000 downpayment in with a grand total of $23,376. If they had taken that deal they would have spent more than $23,000 on a car that supposedly retailed for under $15,000.

Of course, the reason for this vast difference was a bevy of unnecessary and overpriced extra dealer fees and an interest rate that they could have easily beaten through their credit union. Needless to say, they ended up buying elsewhere

A general rule of thumb is that if the total loan amount is vastly greater than the sale price of the vehicle you are buying, do not sign the contract. Walk away.

Now the advanced lifehack to this whole calculator trick is to run the numbers *before* you go car shopping, and this will require several calculations. The first is taking an honest, hard look at your monthly income and deciding how much of that money can you safely allocate for a car payment and also know how much you have for a down payment. If you ignore this step, the chances of you taking a loan that is beyond your means have increased dramatically.

The next step is knowing what your credit score is. There are several free resources that can give you a ballpark of your credit score. While your actual score may be different when it comes to getting a car loan, these numbers will give you a general idea on where you stand. If the FICO reads above 700, chances are you will get the best rates; if it’s in the 600s you will likely get approved but the rates can vary. Below 600 means that you are going to have a hard time getting a loan from a major lender, though it may not be impossible.

Once you know your credit, you should either download or find an auto loan calculator. This will allow you to plug in the three components of a loan: the principal, the term and the rate to get payment calculation. It can be tricky because it will require some trial and error to find the vehicle price range that will line up with your payment. For the sake of running some example calculations, let’s say you have a target payment of $400 per month, and available $2,500 down. A credit score in the high 600 range and you were looking to spend around $25,000 on a new or used car.

You would take $25,000 and subtract your $2,500 down for a remainder of $22,500. In the section for “loan amount,” you plug in $22,500. In the section for “loan term,” you have to decide how long you want your loan to be.

The longer the loan the higher the risk of being underwater, so no more than a five year loan (60 months) is usually recommended. On a new car with a solid resale value maybe you can stretch it to a six year (72 month) loan.

And finally, you need to plug in your interest rate, or APR. This takes a bit of guesswork, but someone within the 600 FICO range is probably going to be somewhere in the ballpark of eight percent. It could be lower or it could be higher; it’s best to use conservative numbers for this exercise.

After all the values are put in, we get a payment of $456. That is $56 more than your target. Now you have two choices—put more money down, or get a cheaper car. If more money down is not an option, you need to reduce the cost of the vehicle. If you drop the loan amount down to $19,500 you hit a payment of $395.39 per month.

That is pretty close, and remember you still have your $2,500 down payment, which means you now have a total spending budget of $22,000 inclusive of whatever taxes and fees are applicable in your area. So you should be looking at cars in the $20,000 or under range to keep a buffer for those extras.

What I described above takes time and work. But remember, the dealer does not care if you can pay your loan off or not. In fact, some really shady places bank on the fact that you can’t pay your loan so they can repossess the car and sell it to someone else.

I want to make clear that my tips on finance are in no way making excuses for dealerships and lenders that participate in predatory practices. I firmly believe that there should be an increase in regulations and enforcement to prevent those situations.

But until that happens every buyer should be using the trusty calculator before they sign a sales contract.