I’ve been helping a friend who went nomadic last year get their Beancount setup ready for tax season, and it’s been a real education in tracking the Foreign Earned Income Exclusion requirements.
The 330-Day Reality Check
The IRS requires 330 full days in foreign countries during any 12-month period to claim the FEIE. For 2026, that’s up to $132,900 of earned income you can exclude from US taxes. But here’s the catch that trips people up: a “full day” means midnight to midnight in a foreign country. That travel day when you landed in Barcelona at 2pm? Doesn’t count toward your 330.
A Beancount Metadata Approach
Here’s what we came up with using custom metadata and events:
; Physical Presence Test Tracking
; Tax Year: 2026
; Qualifying Period: 2025-03-15 to 2026-03-14
2026-01-15 * "Client Invoice - Web Development"
Income:Freelance:Consulting -4500 USD
Assets:Bank:Wise:USD 4500 USD
location: "Lisbon, Portugal"
presence-date: "2026-01-15"
presence-status: "foreign"
For border crossings, tracking separately with events:
2026-02-10 event "travel" "Departure: Lisbon -> Miami (Travel Day - Partial)"
; Arrival 6pm local time - this day does NOT count
2026-02-11 event "travel" "Arrival: Miami, USA"
; Full day in USA - does not count toward 330 days
2026-02-18 event "travel" "Departure: Miami -> Mexico City"
; Travel day - partial
2026-02-19 event "travel" "First full day: Mexico City, Mexico"
; First FULL day in Mexico starts midnight tonight
The Query That Matters
A custom bean-query to count qualifying days:
SELECT
YEAR(date) as year,
meta("location") as location,
COUNT(date) as days
WHERE
account ~ "Income"
AND meta("presence-status") = "foreign"
GROUP BY year, location
ORDER BY days DESC
Documentation Beyond Beancount
The ledger tracks the pattern, but you’ll want supporting docs:
- Flight confirmations (PDF saved with dates/times)
- Apartment lease agreements (proves foreign residence)
- Coworking space receipts (shows where you were working)
- Passport stamps (photographed, though not all countries stamp anymore)
Questions for the Community
- Has anyone found a cleaner way to track travel days vs. full presence days in Beancount?
- Are you tracking this at the transaction level or maintaining a separate presence log file?
- For those who’ve been audited on FEIE claims, what documentation did the IRS actually want to see?
The edge cases worry me most - like flights crossing midnight, or being in international waters. How are others handling these?
References: IRS Physical Presence Test, 2026 FEIE Limit