Have you seen a return on your investment? Before you start counting your pennies, it’s important to understand the Capital Gains Tax. Whether you completed several high-return renovations after moving into your new 12 South home, or you were fortunate enough to move into an area right before an upswing in home values, walking away with a profit on a home sale is an exciting proposition.

But there’s one thing that can suck the excitement right out of such a positive financial move: the threat of taxes on your investment gain — otherwise known as the capital gains tax. Luckily, for sellers, the Taxpayer Relief Act (TRA) of 1997 helps many hold on to the gains earned on their home sale.

Before the law was introduced, homeowners could only qualify for a once-in-a-lifetime tax exemption of up to $125,000 on a home sale, or roll those earnings into the purchase of another home. Today the rules aren’t quite so stringent, but there are plenty of tax exceptions and loopholes to be aware of before you sell. So let’s break down a few often-overlooked facts about capital gains and home sales.

Married or Single? It Matters!

While the TRA did away with the once-in-a-lifetime tax exemption of $125,000, not all restrictions have completely fallen by the wayside. Under the TRA, $500,000 of each home sale profit is tax-free if you’re married, or up to $250,000 if you’re single. But for some newly married couples, claiming this exemption can be a little tricky. If one person owned the house for the past two years, but their partner wasn’t added to the title until, say, the last two months, then they’re in the clear. However, both parties must have lived in the residence for two years prior to the sale — even if only one was on the title before they were married. And that’s not all – if one person sold a previous home within the last two years and cashed in on an exemption, the couple will have to wait until they are both out of that two-year window before pocketing any gains from their shared home.

Different Tax Rates for Different Profit Brackets

Another common misconception is that you’ll owe a higher rate of taxes the higher a price tag on a home. However, for tax purposes, what you owe doesn’t depend on the sale price — it’s based on how much profit you make from the sale. In fact, you could sell your home for $5 million and not owe a penny in taxes — as long as you didn’t make more than the allowed exemption amount on the sale. Another important thing to note: Capital gains tax on real estate isn’t necessarily an all-or-nothing proposition. If you’re nearing the cap on exemptions, you could still qualify for a partial exemption — just be sure to consult a tax professional before you make any big moves.