Whether you purchase another home after the sale of your primary home is no longer relevant. That was removed from the tax code in 1997.
If you sold your primary personal residence and you lived in and owned the home for at least two years in the five year period on the date of sale, you do not have to report the sale if your gains are less then the exclusion amounts of $250,000 if filing Single or $500,000 if filing Married Filing Jointly (and both lived in the home for two years).
If you had a gain greater then the exclusion amounts then you would have to report the sale. Also, if you received a Form 1099-S for the sale either with a gain or a loss, the sale has to be reported.
Thanks..what if it was military orders that caused the move and we were in the house for less than two years. What and how do we deal with that.
IRS Publication 523 Selling Your Home page 4 - https://www.irs.gov/pub/irs-pdf/p523.pdf#page=4
Service, Intelligence, and Peace Corps personnel. If you or your spouse are a member of the Uniformed Services or the Foreign Service, or an employee of the intelligence community in the United States, you may choose to suspend the 5-year test period for ownership and residence when you’re on qualified official extended duty.
This means you may be able to meet the 2-year residence test even if, because of your service, you didn’t actually live in your home for at least the 2 years during the 5-year period ending on the date of sale.
Review the section in the publication on page 4 - Qualified extended duty. You are on qualified extended duty if:
You may not need to suspend the 5 year period. There is an exception to the 2 year rule for those who move for a job change, including military orders. But the maximum exclusion is reduced.
Example: you owned and lived in the house for 15 months and sold it for a $100,000 profit. Your maximum exclusion is reduced to 15/24 x $500,000 = $312,500. Since your $100,000 profit is less than $312,500, you get to exclude the entire $100,000 gain.