The cap is on deductions from regular income if you have a capital loss for a year.
So if you have $50,000 in capital gains and $53,000 in capital losses, your gains are "free". And you can deduct the extra $3k from ordinary income.
You can also carry capital losses forward each year.