Capitol gains tax on primary residence home sale

I am selling my home in Texas which is my primary residence and only home I own.  If I make a profit on my home sale and buy a new home in the same state that is more expensive than the current home, do I still have to pay capitol gains tax and is there a limit on how much profit I can make on a primary home sale before I have to pay capitol gains tax.  For a simple example - I still owe 200k on my mortgage for home A and I sell home A for 450k for a 250k profit.  I then buy home B for 350k so I still have 100k profit leftover from the Sale of home A.  Do I have to pay capitol gains tax on the 100k leftover profit?  What options do I have to avoid paying capital gains tax?