The calculator walks every calendar date from start to end (inclusive), keeps the weekdays, then subtracts your holidays:
Working days = (inclusive days − weekend days) − holidays
Weekends are Saturday and Sunday by default. If you enter the dates in reverse order, they're swapped automatically — the count is the same.