When the taxpayer invests in real estate or  security and then later sells that piece of real estate or security, the IRS characterizes the amount that exceeds the purchase price as capital income while the amount that falls short of the purchase price is capital loss.
If someone invests in real estate or securities and then sells them, the IRS categorizes any profit above their initial investment as capital gains, while any losses below that are considered capital losses.