The IRS issued final regulations establishing a “bright line” test to determine which parent has custody for the greater part of a year so as to be entitled to the dependency exemption. The test counts nights spent: i) at the parent’s residence (whether or not the parent is present); or ii) in the company of the parent when the child does not sleep at the parent’s residence. A child is in the custody of one or both parents for more than one-half of the calendar year if one or both parents have the right under state law to physical custody of the child for more than one-half of the calendar year. A parent may be absent because of military duty, a hospital stay, business trip, or other reasons, and a child who does not reside with a parent for a night is treated as residing with the parent with whom the child would have resided for the night but for the absence. The final regulations include examples of how to allocate the nights during which a child resides with a third party, such as a grandparent. A declaration to release a claim to an exemption must be made on Form 8332 or similar document, and a court order or decree (or a separation agreement) may not substitute for the declaration. The IRS also left unchanged the rule that the custodial parent may revoke a release unilaterally.