Filing status follows marital and household facts at year end. The five statuses are single, married filing jointly, married filing separately, head of household, and qualifying surviving spouse. Start with marital status: someone unmarried or legally separated by a final decree on December 31 is considered unmarried; spouses still married and living together are married and may file jointly or separately.
Head of household can be available to an unmarried person who pays more than half the cost of keeping up a home for a qualifying person. That person generally lives there for more than half the year; a dependent parent can qualify under a special rule even when living elsewhere. A married person living apart may be considered unmarried for this status only if they file separately, pay more than half the home's cost, their spouse did not live there in the last six months, and a child, stepchild, or foster child lived there more than half the year and they can claim the child as a dependent (with limited exceptions).
Qualifying surviving spouse can apply for the two years after a spouse's death when the survivor was entitled to file a joint return with the spouse for the year of death (whether or not one was actually filed), did not remarry, can claim a child or stepchild as a dependent, the child lived in their home all year (apart from temporary absences and the listed exceptions, so being a dependent alone does not settle residence), and they paid more than half the cost of that home for the year. All of these must hold. In the year of death, a joint return may still be available. If more than one status applies, choose the one with the lowest tax.
Worked example
Paz married in June and lives with a spouse at year end. Ana marks married, tests joint against separate on their figures, and selects the lower-tax result. Head of household is set aside because the considered-unmarried test is not met on these facts. The status line follows the household, with the lower-tax choice recorded.