The basic rule. The tax home is the regular place of business. If there is more than one, Publication 463 says to compare the total time ordinarily spent in each place, the level of business activity in each, and whether the income from each is significant. A person who works eight months a year in one city and four in another, earning most of their income in the first, has a tax home in the first.
No main place of business. Some people, such as a sales representative who covers a region or a performer on tour, have no regular workplace. The IRS then looks at three factors: whether you do part of your work near your main home and lodge there while doing it; whether you pay living expenses at that home that you duplicate when work takes you away; and whether you have kept ties to the area, such as family living there or frequent returns. All three make that home your tax home. Two may, depending on the facts. One or none makes you an itinerant, whose "tax home is wherever you work", which means you are never away from home and cannot deduct travel expenses.
Temporary versus indefinite. Work away from the tax home does not move it if the assignment is temporary. The statute draws the line at one year: under section 162(a), a taxpayer is not treated as temporarily away from home "during any period of employment if such period exceeds 1 year." The IRS applies it at the start: an assignment realistically expected to last more than a year is indefinite even if it ends sooner, and one expected to last a year or less is temporary unless the facts change. An indefinite assignment makes the new location the tax home. There is a narrow exception for federal employees certified as traveling to investigate or prosecute a federal crime.
Why it matters now. Travel away from the tax home overnight lets a self-employed person deduct transportation, lodging and 50% of business meals. Most employees can no longer deduct unreimbursed travel at all, because miscellaneous itemized deductions are permanently disallowed, but the tax home still decides whether an employer's travel reimbursement or per diem is tax-free: Publication 463 says that if an assignment is indefinite, amounts an employer pays for living expenses must be included in income, "even if they are called 'travel allowances'". A short list of employees, including Armed Forces reservists and fee-basis state or local officials, can still deduct travel above the line.
Abroad. To claim the foreign earned income exclusion, a U.S. citizen or resident must have a tax home in a foreign country, in addition to passing the bona fide residence or physical presence test. Section 911(d)(3) adds that a person is not treated as having a foreign tax home "for any period for which his abode is within the United States", with a narrow exception for service in a combat zone, so keeping the center of one's life in the United States can defeat the exclusion even for someone working overseas.
Not where your family lives. If you choose to live away from your tax home, the cost of commuting between the two, and your meals and lodging at the tax home, are personal expenses. The IRS's example is a truck driver who lives in one city and works out of a terminal in another: the terminal city is the tax home, and nights spent there are not travel away from home.