Per IRS Publication 503 Child and Dependent Care Expenses, starting on page 4:
You Must Have Earned Income
To claim the credit, you (and your spouse if filing jointly) must have earned income during the year.
Earned income. Earned income includes wages, salaries, tips, other taxable employee compensation, and net earnings from self-employment. A net loss from self-employment reduces earned income. Earned income also includes strike benefits and any disability pay you report as wages.
Generally, only taxable compensation is included. For example, foreign earned income and Medicaid waiver payments you exclude from income aren't included. However, you can elect to include nontaxable combat pay in earned income. If you are filing a joint return and both you and your spouse received nontaxable combat pay, you can each make your own election. (In other words, if one of you makes the election, the other one can also make it but doesn't have to.) Including this income will give you a larger credit only if your (or your spouse's) other earned income is less than the amount entered on line 3 of Form 2441. You should figure your credit both ways and make the election if it gives you a greater tax benefit.
TIP: You can choose to include your nontaxable combat pay in earned income when figuring your credit for child and dependent care expenses, even if you choose not to include it in earned income for the earned income credit or the exclusion or deduction for dependent care benefits.
For information regarding members of certain religious faiths opposed to social security, see IRS Publication 503.
What isn't earned income? Earned income doesn't include:
Rule for student-spouse or spouse not able to care for self. Your spouse is treated as having earned income for any month that he or she is:
If you are filing a joint return, this rule also applies to you. You can be treated as having earned income for any month you are a full-time student or not able to care for yourself.
Figure the earned income of the nonworking spouse, described under (1) or (2) above, as shown under Earned Income Limit under How To Figure the Credit, later.
This rule applies to only one spouse for any 1 month. If, in the same month, both you and your spouse didn't work and are either full-time students or not physically or mentally able to care for yourselves, only one of you can be treated as having earned income in that month.
Full-time student. You are a full-time student if you are enrolled at a school for the number of hours or classes that the school considers full time. You must have been a full-time student for some part of each of 5 calendar months during the year. (The months need not be consecutive.)
School. The term “school” includes high schools, colleges, universities, and technical, trade, and mechanical schools. A school doesn't include an on-the-job training course, correspondence school, or school offering courses only through the Internet.