Capital loss is only deductible against capital gain, plus $3000 per year from oridinary income.
Let's say you sold your rental home at a loss of $10,000, and you don't have any other capital gain (such as stock or real estate), you can only deduct $3000 per year, but the loss can be carried forward for next year.
If next year you have capital gain more than $7000, you can deduct the full left over $7000. If your next year capital gain is 0, you deduct $3000 from ordinary income, and carry over $4000.
and so on and so forth.