Rule 1 – Never get tax advice from a Realtor…only use it from a CPA
Rule 2 – If you break rule 1 then that is your own fault!
******
With that said, if your condo has been your primary residence and falls within guidelines of that IRS definition, (basically if you have occupied it 2 of the last 5 years) you can receive a cap gains exemption of 250k if you are single and 500k if you are married! It doesn’t matter what you do with your profits.
******
If you have not occupied the property then your tax basis will be based on the difference of your sale verses when you bought it. Keep in mind that depreciation will be recaptured. If you have other cap gains losses that you have endured or carried from previous years you can write those “against” your gain.
******
So whatever you invest your profit from the home sale in, your tax liability on those gains is 100% independent of the home sale.