Carryover tax losses from year to year

how may years can a tax loss be carried forward, since you can only deduct $3,000 per year. What if you had a $50,000 loss?