To figure out your gains or losses, track the cost basis and the fair market value at disposal. The formula is: Gain/Loss = Fair Market Value – Cost Basis.