Snippet
Flow
28 Apr 2026
Flow formula: business days between dates
No Apex, no loops — one formula resource that counts weekdays between two dates.
/* Formula (Number) — business days from {!startDate} to {!endDate} */
(5 * FLOOR(({!endDate} - DATE(1900, 1, 8)) / 7)
+ MIN(5, MOD({!endDate} - DATE(1900, 1, 8), 7) + 1))
-
(5 * FLOOR(({!startDate} - DATE(1900, 1, 8)) / 7)
+ MIN(5, MOD({!startDate} - DATE(1900, 1, 8), 7) + 1))No Apex, no loops — one formula resource that counts weekdays between two dates.
Gotchas
DATE(1900, 1, 8) is a Monday — that anchor is what makes the modulo arithmetic work. Holidays are not weekends: if you need them excluded, that is a custom metadata lookup, not a formula.