The IRS uses two tests to exclude your primary residence form capital gains taxes: The Use Test and the Owernship Test.
Use Test: You have lived in the home for at least 24 months or 730 days (365 days x 2).
Ownership Test: You have owned the home for at least 24 months or 730 days
You must meet both tests to exclude the first $250,000 of profit from the sale of your home. If you do not meet both tests, you must pay capital gains tax on profits from the sale of your home. In some cases, you can claim a reduced Maximum Exclusion.
For a reduced maximum exclusion, you must show one or more of the following arose duirng the less than 2 year period of ownership and use: A change of employment, illness, or loss of financial capacity to afford the home.
You may also claim an "Unforseen Circumstance". Unforseen circumstances that may qualify you for a reduced Maximum Exclusion include: Destruction or condmenation of your home, death, unemployment, multiple births from the same pregnancy, or a special circumstance established by the IRS (eg the 9/11 attacks)
In your case, it appears that you would be subject to full capital gains exposure. The tax would be imposed even though you intend to use it towards your next home purchase.
Here is the link to IRS Pub 523: http://www.irs.gov/publications/p523/ar02.html#d0e3182
Your best option to avoid capital gains tax on the sale of your home would be to wait until 730 days of ownership and use have passed. A CPA may suggest another method... but be advised that a Section 1031 Exchange (A deferment of capital gains tax) may not be used for principal residences.
I second that congratulations on a making a profit! Especially in less than two years in this market.
You do need to talk to a tax person or accountant. There are reasons that are exceptions to the rule, and a qualified tax advisor can help you with that. Personally we have used a loophole before and avoided it, perfectly legal, just a stated reason. But you need someone qualified to help you with that process (it's definitely too complicated to do on your own) to make sure you are doing it correctly.
Where are you moving to?
Second, as stated, consult a tax specialist who can give you the right advice. I would think there are ways to avoid paying taxes, especially if you are rolling any gain into the purchase of a new home.
So it works like this. If you bought the home for 200,000 and now you sell your home for 250,000. Your gain is $50,000 minus your costs to sell and your capital improvements. Your tax person can give you the exact numbers, and you will want to consult a tax person if your gain is big.