IRA limits are based on Modified Adjusted Gross Income, which is explained in the IRS publication on Roth IRAs. The Traditional IRA Modified AGI is similar, but not exactly identical.
- Enter your adjusted gross income from Form 1040, line 38; Form 1040A, line 22; or Form 1040NR, line 37
- Enter any income resulting from the conversion of an IRA (other than a Roth IRA) to a Roth IRA (included on Form 1040, line 15b, Form 1040A, line 11b, or Form 1040NR, line 16b) and a rollover from a qualified retirement plan to a Roth IRA (included on Form 1040, line 16b, Form 1040A, line 12b, or Form 1040NR, line 17b)
- Subtract line 2 from line 1
- Enter any traditional IRA deduction from Form 1040, line 32; Form 1040A, line 17; or Form 1040NR, line 32
- Enter any student loan interest deduction from Form 1040, line 33; Form 1040A, line 18; or Form 1040NR, line 33
- Enter any tuition and fees deduction from Form 1040, line 34, or Form 1040A, line 19
- Enter any domestic production activities deduction from Form 1040, line 35, or Form 1040NR, line 34
- Enter any foreign earned income exclusion and/or housing exclusion from Form 2555, line 45, or Form 2555-EZ, line 18
- Enter any foreign housing deduction from Form 2555, line 50
- Enter any excludable qualified savings bond interest from Form 8815, line 14
- Enter any excluded employer-provided adoption benefits from Form 8839, line 28
- Add the amounts on lines 3 through 11
So, to answer your question: anything that contributes to your AGI counts, plus some additional things that are normally excluded from it, except for certain IRA distributions for the purposes of rollovers or conversions.