Residents: If you're a Virginia resident who paid tax to another state as a nonresident of that other state, you can usually claim a credit on your Virginia tax return for the tax you paid to the other state.
Generally, Virginia will allow taxpayers filing resident individual income tax returns to claim credit for income tax paid as a nonresident to another state on earned or business income derived from sources outside Virginia or any gain (if included in federal adjusted gross income) on the sale of a capital asset outside Virginia, provided the income is taxed by Virginia as well as the other state. See Virginia Code Section 58.1-332 for information on capital assets. If the income is from Arizona, California, or Oregon, claim the credit on the nonresident income tax return of that state instead of on the Virginia return. If the income is from the District of Columbia, don't claim this credit - if you paid DC tax on that income, file a tax return with DC to claim a refund of your withholding.
Nonresidents: Generally, Virginia will not allow taxpayers filing nonresident individual income tax returns to claim a credit for income tax paid to another state. The only exception to this rule involves income taxes paid to Arizona, California, and Oregon. If you are a resident of one of these states and have Virginia source income as a "nonresident" and the income is taxed by both Virginia and the other state, you are eligible for the credit.