To calculate the gain or loss for each transaction, subtract the adjusted cost basis from the sale price. If the result is positive, you have a capital gain. If the result is negative, you have a capital loss. For example, if you bought a stock for $100 and sold it for $150, your capital gain would be $50. If you sold the stock for $90, your capital loss would be $10. Form 8949 requires you to report the sale price, adjusted cost basis, and the gain or loss for each transaction.