There is no one time capital gain federal tax write off. It does not exist. If you have capital gains, you pay income taxes on them. If it is your personal residence, you would most likely be able to exclude all or some of the gain. Stock sale, investment property sales (unless section 1031 applies) are taxable.