You've been dreaming of owning a home for years, and now you're finally ready to make the leap. You've found the perfect place and may have even started deciding where to put the furniture, but you still have one big obstacle standing in your way: getting a mortgage.

If you've never bought a home before, the whole process can seem a little confusing. One of the first things you have to figure out is whether you should get a fixed-rate or adjustable-rate mortgage. Most people choose the fixed-rate mortgage without even thinking about it, but there are situations where an adjustable-rate mortgage may be a better fit.

How fixed-rate mortgages work

Every mortgage charges interest in order to make the deal worth it for lenders. With fixed-rate mortgages, you lock in a single interest rate for the lifetime of your loan. Usually, the payment period is 30 years, but it can be 20 or 15 if you want to pay off your home more quickly.

The reason fixed-rate mortgages are so popular is that they're more predictable. You know exactly how much money to set aside out of your paycheck each month to cover the bill. Plus, if interest rates rise, you don't have to worry about your monthly mortgage payment rising accordingly.

The disadvantage is that if mortgage rates go down and you'd like to capitalize on this, you'll have to refinance — and that means spending a few thousand dollars in closing costs. Fixed-rate mortgages also have higher starting interest rates than adjustable-rate mortgages, and that may limit how much home you're able to buy.

How adjustable-rate mortgages work

As the name implies, adjustable-rate mortgages (ARMs) have interest rates that change over the lifetime of the loan. Most ARMs these days are hybrids, which means they have an initial fixed-rated period, after which the interest rate begins to change, usually once per year. You may see this written as 5/1 or 7/1. This means that you get five or seven years of a fixed interest rate, and after that, the interest rate — and your payments — will be adjusted every year.

The risks of ARMs are clear. When your interest rate can change, it's possible that your payments could become so expensive that you can't keep up with them. If your monthly payments during the initial fixed-rate period would put a strain on your budget, an ARM isn't a good choice for you. Before taking out an ARM, be sure to get a Truth in Lending disclosure from your lender, which should list the maximum amount your monthly mortgage payment could reach. Make sure you're comfortable with this amount before you sign on the dotted line.

But there can be times when an ARM is the smarter choice. Starting interest rates on ARMs are usually lower than on fixed-rate mortgages, so your monthly payments will likely be lower for at least a few years. And if you find yourself in an environment where mortgage interest rates are declining or holding steady, your interest rates may not increase significantly even after the fixed-rate period is up.

If interest rates begin to decline, your monthly payments may actually decrease, though not all ARMs allow this, and they often put a cap on how low your payments can go. Typically there are also caps on how much your payments can increase, both annually and over the lifetime of the loan. You may see this written as 2/2/5 or something similar. The first number reflects the greatest amount by which the interest rate can rise in the first year after your fixed-rate period ends — in this case, 2%. The second number represents the most it can change every year thereafter, and the third number represents the most it can change over the lifetime of your loan.

Related: More on buying a home

To put this in perspective, let's say you buy a $250,000 home with a 30-year 5/1 ARM, a 4% initial interest rate, and 20% down. Your initial monthly payment would be $955. In an ideal world, that number wouldn't increase over the lifetime of the loan, and you'd get the whole house for about $344,000, factoring in interest.

However, that's nearly the best-case scenario. Now let's consider the worst-case scenario. Imagine that, after the initial fixed-rate period, your interest rate rose by 0.25% each year until it reached the maximum increase of 5%, bringing your interest rate to 9%. You'd end up paying $419,000 over the lifetime of the loan, and your monthly payment would climb to $1,323.

These are extreme scenarios, and in reality, the price you ultimately paid for your home would likely fall somewhere in the middle. However, you should keep in mind that if your ARM's interest rate reaches its cap, it could cost you tens of thousands of dollars in additional interest payments.

Which type of mortgage is right for me?

Fixed-rate mortgages are usually the better choice for most people. This is especially true if you plan on being in your home for more than five years or if interest rates are historically low, as they are now.

Related links:

• Motley Fool Issues Rare Triple-Buy Alert

• This Stock Could Be Like Buying Amazon in 1997

• 7 of 8 People Are Clueless About This Trillion-Dollar Market

You may want to consider an ARM if you'll only be in the home for a few years, if you think interest rates will decrease, and/or you expect your income to rise enough to absorb higher mortgage payments. Before you sign up for an ARM, though, it's important to calculate how much your mortgage payment could change over the lifetime of your loan to make sure it's still something you could afford.