If you file a joint return, you may be able to contribute to an IRA even if you didn’t have taxable compensation as long as your spouse did. Each spouse can make a contribution up to the current limit; however, the total of your combined contributions can’t be more than the taxable compensation reported on your joint return. See the Kay Bailey Hutchison Spousal IRA Limit in Publication 590-A.
If neither spouse participated in a retirement plan at work, all of your contributions will be deductible.