Residence for state income tax purposes in Alabama is determined based on whether you have domicile in Alabama. According to the Alabama Department of Revenue, domicile is where you live, where you have your permanent home, and where you intend to return when you are absent. The burden of proof regarding a change in domicile is on the taxpayer.
If you are an Alabama resident, you are subject to state tax on all your income from all sources. If you are not a resident, you are subject to tax on certain income from Alabama sources. You would have to file an Alabama tax return if your gross income is over the prorated exemption amount based on your filing status. Nonresidents who are required to file must use Alabama Form 40NR.
If you are a part-year resident of Alabama you would be subject to Alabama tax on all your income from all sources for the part of the year you are an Alabama resident, and on your income from Alabama sources for the part of the year you are a nonresident. If you have sufficient income to be required to file for the part of the year you were a resident, you would file Form 40 for that part of the year. If you had Alabama source income and are required to file for the part of the year you were a nonresident, you would also file Form 40NR. According to the Alabama Department of Revenue, in this case the total personal exemption and dependent exemption would be claimed on the part-year resident return (Form 40). No exemptions would be claimed on the nonresident return.
Nonresidents are subject to Alabama income tax on all income received in Alabama or for services performed in Alabama, and gains from the sale of property located in Alabama, unless the income is specifically exempt. There is a column on Form 40NR for your total income from all sources and another column for your Alabama income.
Alabama income would include wages, salaries, taxable fringe benefits, bonuses, commissions, fees, and tips for work in Alabama; interest and dividends from businesses located in Alabama; rents and royalties on property located in Alabama; and your share of income from a partnership or S corporation doing business in Alabama.
Military personnel who are residents of another state and are stationed in Alabama are not required to file an Alabama tax return unless they have earned income from Alabama sources other than military pay. Spouses of service members who are not residents of Alabama and are in Alabama only to be with their service member spouses are not subject to tax on income from services performed in Alabama. They would be subject to tax if they have income from other sources in Alabama.
Sources:
Alabama Form 40NR Booklet, Alabama Department of Revenue
Form 40, Alabama Individual Income Tax Return
Form 40NR, Alabama Individual Nonresident Income Tax Return