@Dallas Smith, With some good running of the numbers by your accountant this can work. You're dealing with two parts of the IRS code.
1. Your primary residence - if you've lived in it for 2 out of the 5 years prior to selling you'll get the $250K/$500K tax free iike @Clint Galliano said. This is tax free. You don't have to do anything with the money and there's no time limits or anything.
2. Your investment property - This you could do a 1031 exchange on and buy another property you intend to use for investment. Doing this will indefinitely defer paying tax on profit or depreciation recapture. But you have to purchase new investment property of at least as much as your net sale to avoid tax. You can't buy your new primary residence with it.
But, here's where you could make it all work.
1. Sell your primary and take the money tax free.
3. Sell your investment property and buy the land for your business. As long as the business portion of the land is at least equal to the amount of your sale that would satisfy your exchange. You could use the rest of the land to build your primary residence.
or... Start a reverse 1031 exchange. The QI for the 1031 buys the land and holds it while you start construction on it. You could use the sale of your primary and the sale of your investment property to fund the purchase of the land and the beginning of construction. Once the construction of the business building was far enough along (but no more than 180 days) that the price of the land and the amount of improvements you make on it are equal to the sale of your old investment property you take title to it and that would complete your 1031 exchange. You could then complete the construction and build your primary where you want on the land.
It's a bit of a complicated process. But could be a great deal for you in the right circumstances.