When the coronavirus pandemic emptied offices and schools in March 2020, many Americans found themselves utilizing the space in their homes in new and unexpected ways.

The indoor and outdoor space that had previously seemed sufficient suddenly felt crowded and cramped. Many families began perusing real estate listings to find a home that better accommodated virtual work and school, or a second home that allowed them a change of scenery in a safe environment.

For potential home buyers, low interest rates and market gains only made the idea of buying a new place more attractive. The increased demand piled on to an already-strong residential real estate market, driving home prices upward and depleting inventory in sought-after areas across the country. Despite these challenges, some individuals and families can’t help but wonder: Is this the right time to purchase a home?

As with most financial decisions, whether this is the right time to buy comes down to several factors. Here are three things to ask yourself before making an offer:

1. Are we gaining something with this purchase?

Sure, you’d love to have that extra bedroom or larger backyard. But does the benefit of those amenities offset the cost?

Your cost goes beyond just the total purchase price of the house. Moving to a more expensive location or gaining square footage means you’ll probably end up paying more in fixed expenses and maintenance costs. A down payment could deplete your savings, reducing your access to liquid funds in case of an emergency.

Additionally, selling investable assets to use toward a down payment means you might miss out on potential future growth. However, if you’ve decided the benefits outweigh the costs and you plan to proceed with a purchase, you might want to sell those assets right away and avoid the risk of future market losses. Keeping your funds liquid means you’ll be ready to pounce when your dream home appears on the market.

2. Does this purchase fit into my midterm and long-term plans?

While buying a new home might make sense today, will it still fit your needs in the coming five to 10 years? That’s difficult to answer, especially as questions linger around the pandemic. For example, you might want the additional space for remote work now, but you may discover you overbought if you return to in-person work next year. Alternatively, if you buy now and your company decides to adopt virtual work permanently, will you want to relocate to a different city?

Purchasing now might also impact your long-term retirement plan, especially if you plan to begin a new 30-year mortgage and retirement age is approaching. A higher mortgage payment could also mean you have less available money to save in retirement accounts.

During the pandemic, many people have discovered that what they really want is the flexibility to adapt their living environment to their current situation. In that case, renting can be a better choice financially. While a stigma about renting persists, it is gaining popularity among Americans who want to keep their living options open.

3. What other risks exist in buying?

While there is never a guarantee that you’ll make money on the sale of your home, concern exists about a current housing bubble. There is a risk that your property will actually decrease in value, especially if you don’t sell before the bubble bursts. Some homeowners are still feeling the sting of their experience in the housing market events in 2009 and 2010.

Even if property values continue to climb, the rate of return on your purchase may not keep pace with other investments. Since real estate is not a liquid asset, you won’t realize gains on your purchase until you sell — and there is no way to know what the market environment will be when the time to sell comes.

While it may make logical and mathematical sense, buying a home is often driven less by logic and more by emotion. A financial adviser can help analyze the benefits and costs and review the impact of a home purchase on your retirement plan. With their guidance, you can determine if the time is truly right to buy.

David Mount is a director with the Wise Investor Group at Robert W. Baird & Co. in Reston, Va. Baird does not provide tax, legal, or real estate advice and does not provide or service mortgages.

Read more Real Estate: