In May 1997 rules on home sales changed dramatically. This abolished the rule requiring reinvestment of home sales proceeds. Additionally, you are now allowed to keep gains of $250,000 per person or $500,000 for a jointly owned home provided you meet certain requirements. Any gains over and above these gains are taxable gains as long term capital gains. There are essentially 2 tests you have to meet to qualify for this tax free gain.
In case of joint ownership, only one spouse needs to meet the ownership test. For example, one spouse may have solely owned the house for 2 of past 5 years. But both spouses need to meet the use test. Note that you can get this tax free gain on home sale only once in a 2-year period. If you don’t fulfill the 2-year use test, in some cases, you may be eligible for partial tax free gain. See more on this topic...
You do not report the sale of your main home on your tax return unless you have a gain and at least part of it is taxable. Any taxable gain on personal residence is reported on Schedule D (Form 1040). We have noticed that over a long period home prices tend to go up. But that may not be the case always. In case you incurred losses on selling your home, there is no provision of considering it as a capital loss. Any unqualified gain on the house is taxed based on the holding period. If the house was owned for less than a year, the taxable gain will carry short term capital gain tax rate (currently same as ordinary income tax rate). For homes held longer than one year, taxable gain will carry a lower long term capital gains tax rate (currently 15% in most cases, 5% for individuals falling in lower tax brackets).
Of course people have different situations with respect to how they acquired the house e.g. was it inherited? or gifted? or you traded it with some other property? or you built it? or you acquired it from your spouse etc. Similarly there ar scenarios on how the property was titled (joint or single ownership or single for some time and then joint) and whether it was located in a community property state and whether your partner/spouse was alive at the time of sale etc. IRS has done a very good job in publication 523 laying out different scenarios to guide you further.
If you had to sell your residence under unforeseen circumstances and you did not fulfill the use test, you may still be eligible for partial tax free gain on the sale of primary residence. Unforeseen circumstances generally include job change or health reasons or other unforeseen circumstances. Health reasons are subject to interpretation. One could argue being sick of living at a place.
Partial exclusion available per person is = (# of months lived in the house/24)*$250,000.
A loss on home sale is considered to be a personal loss hence it can not be deducted.