Putting together enough money for a down payment on a home isn’t easy. For many people—and especially for many first-time homebuyers—scraping together the traditional 20% down payment may feel next to impossible.

If you’d like to be a homeowner, but you don’t have stacks of cash just sitting around, you’re not out of luck. Mortgage insurance makes homeownership possible for folks who don’t have much to put down on a home.

So how does mortgage insurance work? We’re glad you asked.

What is Mortgage Insurance?

Mortgage insurance protects your mortgage lender in the event that you, the borrower, can’t repay your mortgage.

Like homeowner’s insurance, your mortgage lender may require you to pay for mortgage insurance as a condition of financing your home purchase.

Unlike homeowner’s insurance (which pays you, the homeowner, if something bad happens to your home), mortgage insurance pays your mortgage lender if you, the borrower, can’t pay your mortgage. Without mortgage insurance, most lenders would be unwilling to take a risk on borrowers who aren’t able to make a significant down payment.

When talking about mortgage insurance, you’ll mostly run across the acronym PMI, which stands for private mortgage insurance. PMI applies to conventional mortgages loans—that is, mortgages not backed by government programs.

Government-backed FHA loans have a special type of mortgage insurance called MIP, which stands for mortgage insurance premium. PMI and MIP are pretty similar—with one critical difference, which we’ll cover in a bit.

Will I Need Mortgage Insurance?

Maybe. If your down payment is going to be less than 20%, most lenders of conventional loans will require you to pay for private mortgage insurance.

Fun fact: last year, the typical American homebuyer put down 10%. The typical first-time homebuyer only put down 5%. That means that most folks buying homes in America are paying mortgage insurance of some kind, at least to start.

Why Do Lenders Require Mortgage Insurance?

The reasoning behind mortgage insurance is actually pretty simple. Your lender is taking a (carefully calculated) risk by offering you a mortgage. If you suddenly decide to stop paying your mortgage and your lender has to foreclose on your home, your lender would be out all of the money they just lent you to buy that home, plus all the time, effort, and money they’ll lose having to find a new buyer for the place.

For your lender, the prospect of having to foreclose a home to try to recoup the mortgage is a major headache. And the potential headache becomes even more significant for the lender if the borrower doesn’t have much equity in the home.

For example: let’s say you’re buying a home that costs $300,000. If you put in a $60,000 down-payment, you’d only need to borrow about $240,000 from your lender.

If you defaulted on that mortgage, you’d be out your $60,000 (plus whatever you’d managed to pay on the mortgage before defaulting.) And your lender would have a deed to a home worth $300,000 for which the lender only put up $240,000. And that leaves them plenty of wiggle room to make back the money they lent you to buy the place. Theoretically, your lender could sell your former property quickly for $50,000 less than you paid and still make back all the money they risked on your mortgage.

On the other hand, let’s say you only put down 5% for your $300,000 home. Now, $15,000 is still a lot of money to lose if you can’t continue to pay your mortgage. But losing $15,000 stings less than losing $60,000. Your lender, on the other hand, would be out $285,000 with a deed to a property that’s only worth just a little more than that. In this scenario, your lender would be much more likely to lose money on the deal without mortgage insurance to offset some of that potential loss.

So How Much Does Mortgage Insurance Cost?

For PMI, the exact costs depend on your credit score, how much you’re borrowing, and how much you’re putting down. Generally, PMI is about 1% of the original loan amount per year, spread out over your monthly mortgage payments.

So, if you’re buying that $300,000 house with $15,000 down, you’d be looking at around $238 a month in PMI payments (assuming a 1% rate).

FHA mortgages require a one-time upfront fee for mortgage insurance and annual mortgage insurance premium payments, spread out over your monthly mortgage payments. Unlike conventional PMI, where the exact costs vary based on your credit score, the costs for FHA mortgage insurance premiums are the same for all FHA borrowers.

Currently, FHA borrowers pay 1.75% upfront, and then between 0.45% – 1.05% annually, depending on the size of the downpayment and the loan term, or length of time they’ll be paying back the mortgage. It’s not an insignificant expense, though again, if a low-downpayment mortgage is the only way you can afford to purchase a home, the extra expense may well be worthwhile.

How Long Do I Have to Pay Mortgage Insurance?

Good news for conventional mortgage borrowers: PMI doesn’t last forever. After all, once you’ve built some equity in your home, the risk goes down for your lender. You can build equity in your home by paying down the principal on your mortgage, or if your home’s value increases.

Once your loan balance gets down to 80% of the original cost of your home, your lender has to cancel your PMI obligations if you ask them to. If you aren’t paying attention and don’t ask about it, the lender is required to cancel the PMI bill on their own once the balance is under 78%. (Still, the lesson here: keep track of your loan balance and avoid paying more PMI than you have to pay.)

Now, some not-as-great news for FHA borrowers: if you finance more than 90% of the cost of your home—and most FHA borrowers do—your mortgage insurance premiums stick around for the duration of the loan. You’ll pay mortgage insurance as long as you’re paying that mortgage, well past the point at which you’ll have built up significant equity in your home. To get rid of the expense of mortgage insurance on an FHA loan, you’ll either need to refinance or pay off the mortgage.

What’s This I Hear About LPMI, or Lender-Paid Mortgage Insurance?

With LPMI or Lender-Paid Mortgage Insurance, a lender allows a borrower to avoid making monthly PMI payments in exchange for a slightly higher interest rate on the mortgage. That’s right, folks. It’s possible to get a mortgage with less than 20% down from a regular, conventional lender, with no PMI.

Now, not all mortgage lenders offer LPMI—typically, lenders reserve LPMI options for especially well-qualified borrowers. But LPMI can potentially save borrowers money on their monthly mortgage payments. With LPMI, a higher interest rate will likely mean a higher base monthly payment, though the monthly payment with the higher interest rate is usually less than a lower interest monthly payment plus the expense of regular PMI. And, as an extra bonus, a comparatively lower monthly payment without PMI could also mean qualifying for a larger mortgage. It could make the difference between being able to afford the house of your dreams, or being just short of the target.

LPMI can also potentially have some tax advantages. In years past, PMI has been tax deductible for many low- and middle-income borrowers, but not for higher income borrowers. (This may be a moot point, going forward: Congress hasn’t extended the PMI tax deductions for tax year 2018—though there was a last-minute extension for tax year 2017, so anything’s possible.) Mortgage interest, on the other hand, is still tax deductible for filers who itemize their deductions. And that means for some borrowers, a higher interest mortgage with LPMI could be worth a little more money come tax time.

Now, the downside to LPMI: regular, boring PMI eventually goes away. Your higher interest rate won’t. By accepting a higher interest rate to avoid PMI, you’re keeping that same, slightly higher interest rate for the duration of your mortgage. Still, the extra interest could be well worth it, depending on your situation as a borrower.

Remember, PMI and mortgage insurance aren’t a bad thing: mortgage insurance allows people who might otherwise be unable to buy a home to become homeowners. As with all mortgage expenses, when it comes to PMI, it’s important to be sure you understand what you’re paying for and why before you finalize your mortgage. (And if you’re ready to see what kind of mortgage you qualify for, we’re here to help.)