Deductions & credits

Thanks! I read ...total compensation includible in the gross income... to mean all gross income on line 9 or Form 1040 not just W2 compensation. I have pension income, dividend income and taxable railroad retirement income in the line 9 figure. I guess that cannot be included since it is not "earned" income.