The Federal Reserve announced last week that it plans in the next few months to hike interest rates and ease up on buying bonds, measures it put in place to prop up the economy during the pandemic. And, in fact, the average mortgage rate for the popular 30-year fixed-loan ticked up this week — perhaps signaling that the days of historically low home financing costs are numbered.

So, does that mean you should rush out and refinance your mortgage by the end of the year?

First, let’s look at why rates fell so much this year, fueling the refinancing craze.

The rates can rise and fall for a number of reasons — including yields on 10-year Treasury notes, the stock market and the jobs report. But the main factor in the low rates is the Federal Reserve, which has been investing trillions of dollars into mortgage-backed security bonds to keep the housing market strong during the pandemic.

Over the years, the 30-year fixed rate has varied dramatically. It was at its highest level in 1981 — an annual rate of 16.63 percent — when the Federal Reserve raised it to ease hyperinflation. It was 6.97 percent 20 years ago and 4.45 percent 10 years ago.

Like other homeowners, you’ve probably been inundated with promos from lenders offering to save you hundreds of dollars a month by refinancing your mortgage at a lower rate. You may be wondering whether you’re a good candidate for refinancing and if so whether it’s the right time to do it.

When is it advantageous to refinance?

“If you can reduce your mortgage interest rate by ½ percent to ¾ percent and if you expect to be in the house more than three years, then it makes sense to look into refinancing,” says Greg McBride, senior vice president and chief financial analyst for Bankrate.com.

There is a break-even period and it will vary depending on the loan. Typically, after three years you start to reap the benefits of refinancing. Ask yourself, “Are you going to stay there or own the home long enough to take advantage of the refinancing?” says Joel Kan, associate vice president of economic and industry forecasting at the Mortgage Bankers Association.

Another key factor is the cost of refinancing. “There are a number of entities that have their hand in your pocket,” says McBride. There can be lender costs such as origination fees, application fees and also third-party fees such as appraisal fees, title work fees, local and state government taxes, and recording fees. “See what else besides the rate is added to the mix,” McBride says. Most often, borrowers roll these costs into the loan amount.

Other reasons to refinance are: to take cash out of your home for debt consolidation or to complete home improvement projects or to change the kind of loan you have. For example, if you have an adjustable-rate mortgage, you may prefer to change it to a fixed-rate loan so you won’t face larger monthly payments if the rate adjusts higher after its initial fixed period.

When is it better to hold off on refinancing?

If the rate you have is close to 3 percent, it may not necessarily be worth it to refinance, especially if you are not sure how long you plan to live in or keep your home. “The rate may not have fallen low enough,” says Kan. “Refinance when there are enough benefits to refinance. Are you taking cash out? What is the lowest possible rate? If you are going to move and sell your place in the near future — a year or so — you may not want to refinance. Consider the closing costs and the length of the loan as well as the rate.”

There are a lot of calculators online that allow you to figure your potential savings by entering the new loan amount, the rate and the length of the loan, such as one offered by Fannie Mae. “If it’s a larger loan amount, even if you will get a rate reduction,” it may not be worth it, Kan says. “Your savings depend on the loan amount and the rate drop. Smaller loans need a bigger rate drop to produce savings.”

The average home loan size is $300,000 to $400,000, according to Jonathan Lee, senior director at Zillow Home Loans.

Other reasons to hold off on refinancing are: If your financial situation has either changed or deteriorated, says McBride. Another reason is if you are not saving on total interest over the life of the loan or on your monthly payment.

What are the biggest obstacles to refinancing?

Loss of income due to lack of work, a credit score that has dropped or is too low, and a high debt-to-income ratio can prevent you from refinancing.

Debt-to-income ratio is your total debts each month compared to your monthly income. An optimum debt-to-income ratio is below 36 percent, says McBride. That means that your debts — including your monthly mortgage payment, monthly maintenance fees or common charges, taxes, property insurance, credit cards and vehicle loans — should not exceed 36 percent of your gross pay.

Certain business owners can face difficulties getting refinancing. It can be harder to qualify for a mortgage if you have 1099 tax income from a sole proprietorship, for example, rather than W-2 income as an employee.

Yet “you can have good credit without traditional sources of income,” says Kan. There are credit models that reflect nontraditional incomes.

What else do I need to be aware of?

Closing costs: There are costs associated with refinancing a loan, and they are typically lower than when you purchase a home. When you purchase a home, closing costs can range from 2 percent to 6 percent of the loan amount, according to lender estimates.

For a refinance, average closing costs accounted for less than 1 percent (.87 percent) of the loan amount, excluding taxes, according to a report from ClosingCorp, a San Diego company that provides residential real estate closing cost data for the mortgage and real estate services industries. With taxes included, the average cost of refinancing was 1.29 percent of the loan amount. Estimates for closing costs vary depending on the state and municipality of the home. Yet because the cost of closing a loan can include state and local taxes, ask what is included in the term “closing costs.”

According to ClosingCorp, the average closing costs for a single-family home in 2020 were $3,398 including taxes, and $2,287 excluding taxes. ClosingCorp refinance calculations include lender’s title policy, appraisal, settlement and recording fees, as well as various state and local taxes.

Some states require an attorney to review the closing documents. If required in your state, that would add an attorney fee to your closing costs.

Lender credits: In short, lender credits can eliminate all or some of your closing costs. Sometimes a lender will offer lender credits toward the cost of closing your loan or you can ask about them. Lender credits may increase your mortgage rate by a fraction such as to 2.875 percent or more from 2.75 percent but they don’t always increase your rate.

A disadvantage of obtaining lender credits would be if the lender credits increase your mortgage interest rate, and cause you to pay more interest over the life of your loan compared with a lower mortgage interest rate and some closing costs rolled into the loan amount.

The ability to obtain lender credits depends on your loan-to-value ratio, which is the amount you are borrowing compared to the value of the property, the interest rate, and the lender’s willingness to offer these credits as an incentive to do business with you.

Points: A point is 1 percent of the loan amount, and lenders may offer you a mortgage rate that is lower but has a fraction of a point or points associated with it. Make sure when you are comparing rates you are comparing the actual rates and any points associated with each rate various lenders offer.