You may be able to exclude from income any gain up to a limit of $250,000 ($500,000 on a joint return in most cases).
To claim the exclusion, you must meet the ownership and use tests. This means that during the 5-year period ending on the date of the sale, you must have:
Owned the home for at least 2 years (the ownership test), and
Lived in the home as your main home for at least 2 years (the use test).
If you qualify for the capital gain exclusion, you do not have to report the gain on the sale of your personal residence on your federal tax return. Unless the gain on the sale was greater then the exclusion or you received a Form 1099-S for the sale of the home.
See IRS Publication 523 Selling Your Home for more information - http://www.irs.gov/pub/irs-pdf/p523.pdf