Article originally published by CNBC.com.

Written by Kate Dore

“If you recently made a profit selling your home, it may come with a costly surprise this filing season: capital gains taxes on your windfall.

In 2021, the average U.S. home seller scored a profit of $94,092, up 71% from $55,000 two years ago, according to ATTOM, a nationwide property database.

While many sellers’ profits fall under the capital gains thresholds for primary homes, others may get hit with an unexpected bill, particularly long-time property owners, experts say.

Home sales profits are considered capital gains, levied at federal rates of 0%, 15% or 20% in 2021, depending on taxable income.

The IRS offers a write-off for homeowners, allowing single filers to exclude up to $250,000 of profits and married couples filing together can subtract up to $500,000.

But these thresholds haven’t changed since 1997, and median home sales prices have more than doubled over the past two decades, affecting many long-term homeowners.

“It’s become a huge part of the conversation now,” said John Schultz, a CPA and partner at Genske, Mulder & Company in Ontario, California.

While the exemption may be significant for some homeowners, there are strict guidelines to qualify. Sellers must own and use the home as their primary residence for two of the five years preceding the sale.

“But the two years don’t have to be consecutive,” said Mary Geong, a Piedmont, California-based CPA and enrolled agent at the firm in her name.”

Click here to read the remainder of this article.