It may be that your modified adjusted gross income for ROTH IRA purposes is different than your adjusted gross income on your form 1040, so you are using the wrong figure.
You can use worksheet 2-1 in IRS publication 590 to calculate your modified adjusted gross income for your ROTH IRA.
MAGI or ROTH IRA