This guide approximates the FEIE Physical Presence Test by tracking up to 35 days in the United States during a rolling 365-day period. The actual IRS test requires at least 330 full days in foreign countries during any period of 12 consecutive months, which may begin on any date. Days outside the US do not always qualify: partial travel days and time over international waters or airspace may not count. A foreign tax home, foreign earned income, and other requirements also apply. Use Form 2555 or consult a tax professional to confirm eligibility.
https://www.irs.gov/individuals/international-taxpayers/foreign-earned-income-exclusion-physical-presence-test