Buying a home is a usually a smart investment, unless the Internal Revenue Service (IRS) treats it like an investment. If the IRS decides that you bought a property as a short-term investment -- to "flip" it for a profit, in other words -- then it will charge a 20 percent capital gains tax on any profit you make from the sale.
The best way to protect yourself from capital gains tax on the sale of a home is to qualify the home as a long-term investment. The IRS uses two tests to determine if your home qualifies as a long-term investment: time and residency. If you owned the home for at least two out of the past five years, then you pass the time test. Similarly, if you lived in the home as your primary residence for at least two of the past five years, you pass the residency test.
If you're a single person and pass both the time and residency tests, then you're allowed to earn up to $250,000 in profit from the sale of your home -- tax-free. That's a nice chunk of change. But here's the kicker: If you're married, you can make up to $500,000 in profit from the sale of a home without paying a cent in capital gains.
The qualifying rules for married couples are even more lenient than for single homeowners. For a married couple, only one spouse has to own the house for two of the past five years. However both have to live in the house for at least two years [source:TurboTax]. As an added bonus, the IRS even counts the time that a married couple lived in the home before they were married. So if you lived together in a house for a year before you were married, you only have to live there for a year as a married couple to pass the residency test [source: FindLaw].
For lots more information about the marriage bonuses, income taxes and the IRS, explore the links on the next page.