The correct order of doing things is this:
- Calculate how much you would owe to the US if you were not a US citizen, resident in Spain. This only applies if you actually have US source income. For example, if a Spaniard has a brokerage account in the US, they would file a 1040-NR return using the rules established in the US/Spain tax treaty for how much tax the US gets to keep on US source income. Generally the rules are:
- Salary for work in the US: complicated. Read tax treaty
- US Bank interest: nothing
- Tax exempt dividends in mutual funds: nothing
- Capital gains dividends in mutual funds: nothing
- Ordinary dividends in mutual funds: 15% (no difference between qualified vs non-qualified)
- Make an estimated payment for these taxes in the US. This is important since you cannot take a credit for foreign taxes paid in Spain unless you’ve actually paid them.
- File your Spanish taxes (before June 30), using the taxes you calculated as the foreign withholding.
- Put the 1040-NR calculations aside and fill out a regular 1040. Use the taxes paid in Spain as a foreign credit on your US taxes. The complication ensues when you need to adjust the gross income so that your foreign tax credits don’t erase the minimums you calculated back in step one.