Read section 1.121-1(b)2:
(b) Residence—(1) In general. Whether property is used by the taxpayer as the taxpayer's residence depends upon all the facts and circumstances. A property used by the taxpayer as the taxpayer's residence may include a houseboat, a house trailer, or the house or apartment that the taxpayer is entitled to occupy as a tenant-stockholder in a cooperative housing corporation (as those terms are defined in section 216(b)(1) and (2)). Property used by the taxpayer as the taxpayer's residence does not include personal property that is not a fixture under local law.
(2) Principal residence. In the case of a taxpayer using more than one property as a residence, whether property is used by the taxpayer as the taxpayer's principal residence depends upon all the facts and circumstances. If a taxpayer alternates between 2 properties, using each as a residence for successive periods of time, the property that the taxpayer uses a majority of the time during the year ordinarily will be considered the taxpayer's principal residence. In addition to the taxpayer's use of the property, relevant factors in determining a taxpayer's principal residence, include, but are not limited to—
(i) The taxpayer's place of employment;
(ii) The principal place of abode of the taxpayer's family members;
(iii) The address listed on the taxpayer's federal and state tax returns, driver's license, automobile registration, and voter registration card;
(iv) The taxpayer's mailing address for bills and correspondence;
(v) The location of the taxpayer's banks; and
(vi) The location of religious organizations and recreational clubs with which the taxpayer is affiliated.