I heard if you buy it back within 30 days you don't have to pay. Is this correct? Only if you sell it at a loss. If you then buy it back within 30 days, it is a wash sell and you do not get a capital loss but have to subtract the loss from your new basis when you buy the stock again. You should look for Wash Sales in FAQ and do a search. There have been a number of threads about it.If you sell it at a profit, you must pay tax on the gain, either short term capital gains taxed as ordinary income or long term capital gains taxed at a maximum of 20%. There is no "cut off date" on gains nor can you reinvest to defer the taxes.