There is also a stipulation about how long you have owned and occupied your current home that comes into play but not being a tax person, like everyone else who answered before me said, I'll add the same comment, check with someone in that industry to make sure. Like we experience in real estate, the rules are constantly changing. Best of luck!!!
Real Estate questions, buying, selling, or investments I'm sure we would all have similar answers. However, taxes is a whole different ball game. You should consult a cpa or tax attorney. They offer free initial consultations in most cases
Section 121 of the Internal Revenue Code would cover this situation if it is your primary residence. If it is, you can make a profit of $250,000 for a single taxpayer and $500,000 for a couple filing jointly without paying any income tax. The old tax code used to deal with the value of your replacement home, but the new version does not. Go to IRS.gov for more details and check with your tax adviser before you proceed.