Retirement tax questions

You can only contribute an amount equal to your earned income or $6000 whichever is less.