> ## Content Index
> Fetch the complete content index at: https://www.namastesalesforce.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Flow formula: business days between dates
- URL: https://www.namastesalesforce.com/snippets/flow-business-days-formula/
- Published: 2026-04-28T09:00:00.000Z
- Updated: 2026-04-28T09:00:00.000Z
- Description: No Apex, no loops — one formula resource that counts weekdays between two dates.
- Author: Swarnil Singhai
- Tags: #snippet, #snippet-lang-flow, Flow, #Import 2026-09-03 19:13

```text
/* 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.