To calculate the number of workdays in a month in Excel, use the =NETWORKDAYS(start_date, end_date, [holidays]) function. This formula automatically excludes Saturdays and Sundays from the count, providing the total number of business days between two specific dates. If you have a custom work week (such as working on Saturdays), use =NETWORKDAYS.INTL instead.

What You'll Need

  • A computer with Microsoft Excel installed (all modern versions support these functions).
  • A start date (the first day of the month).
  • An end date (the last day of the month).
  • An optional list of holiday dates to exclude from the count.

Step-by-Step

  1. Set Up Your Date Range: In your Excel sheet, enter the first day of the month in one cell (e.g., cell A2) and the last day of the month in another cell (e.g., cell B2). For example, for January 2024, enter 1/1/2024 and 1/31/2024. Ensure these cells are formatted as "Date" via the Home tab > Number format dropdown.
  2. Create a Holiday List (Optional): If you want to exclude public holidays or company-specific days off, list these dates in a separate column (e.g., cells E2 through E10). This ensures that a Monday that is a national holiday is not counted as a workday.
  3. Apply the NETWORKDAYS Formula: Select the cell where you want the result to appear. Type =NETWORKDAYS(A2, B2) and press Enter. Excel will calculate the total number of days between the two dates, subtracting all weekends.
  4. Integrate the Holiday Range: To include your holiday list, modify the formula to =NETWORKDAYS(A2, B2, E2:E10). The third argument tells Excel to check the range E2:E10 and subtract any date found there from the final total, provided that date falls on a weekday.
  5. Automate the End Date (Advanced): Instead of manually typing the last day of every month, you can use the EOMONTH function. Replace the end date cell (B2) in your formula with EOMONTH(A2, 0). Your final formula would look like: =NETWORKDAYS(A2, EOMONTH(A2, 0), E2:E10). This allows you to simply change the start date in A2, and the formula will automatically find the end of that specific month and calculate the workdays.
  6. Handling Custom Weekends: If your work week is not Monday through Friday, use =NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays]). When you type the comma after the end date, Excel will show a dropdown menu. You can select "Saturday only," "Sunday only," or "Friday and Saturday" depending on your region or industry.

Common Mistakes

One of the most frequent errors is entering dates as text rather than actual date values. If you type "January 1st" instead of "1/1/2024," Excel may treat the entry as a string of text, causing the #VALUE! error. Always ensure your dates are right-aligned in the cell, which indicates Excel recognizes them as numeric date values.

Another common mistake is forgetting that the NETWORKDAYS function is inclusive. This means if the start date is a Monday and the end date is the same Monday, the result will be 1. Some users expect it to calculate the difference (0), but for business day counting, the start and end dates are counted as part of the work period.

Users also frequently forget to use absolute references for their holiday list. If you drag the formula down to calculate workdays for an entire year, the holiday range (e.g., E2:E10) will shift to E3:E11, E4:E12, and so on. To prevent this, use dollar signs to lock the range: $E$2:$E$10.

Tips

To make your spreadsheet more dynamic, use a "Named Range" for your holidays. Highlight your list of holiday dates, go to the Name Box (top left, next to the formula bar), and type "CompanyHolidays". Now, your formula becomes =NETWORKDAYS(A2, B2, CompanyHolidays). This makes the formula much easier to read and maintain.

If you need to calculate workdays for a specific project that doesn't align with a calendar month, you can use the same NETWORKDAYS logic. Simply point the formula to your project start and end dates. This is particularly useful for calculating SLAs (Service Level Agreements) where only business days count toward a deadline.

For those using NETWORKDAYS.INTL, you can use a "string" to define custom weekends. Instead of choosing from the dropdown, you can enter a 7-character string of 1s and 0s in quotes. A "0" represents a workday and a "1" represents a weekend. The string starts on Monday. For example, "0000011" is a standard Sat/Sun weekend, while "0000001" means only Sunday is a day off.

Troubleshooting

If your formula returns a #VALUE! error, the most likely cause is that one of the dates is not recognized as a date. Check the formatting of your start and end date cells. You can test this by changing the cell format to "General"; if the date turns into a five-digit number (like 45292), it is a valid Excel date. If it stays as text, you must re-enter it.

If the count seems too high, check your holiday list. Ensure there are no empty cells within the selected range that might be interpreted as zeros (which Excel sees as the date January 0, 1900). While this usually doesn't affect the count, it's best practice to keep your holiday range tight to the actual data.

If the count is too low, verify that you haven't accidentally included weekends in your holiday list. NETWORKDAYS only subtracts dates that fall on a weekday. If you list a Sunday as a holiday, it won't be subtracted twice; Excel already ignores Sundays. However, if you are using a custom weekend via NETWORKDAYS.INTL, ensure your holiday list aligns with your defined workdays.

If the result is a date (e.g., "January 15, 1900") instead of a number (e.g., "22"), it is because Excel has automatically applied a Date format to the result cell. Go to the Home tab and change the Number format dropdown from "Date" to "General" or "Number" to see the actual count of days.

Frequently Asked Questions

Can I exclude specific hours of the day?

No, NETWORKDAYS only counts full days. To calculate specific working hours, you would need to calculate the total workdays, multiply by your daily hours, and then manually add or subtract the partial hours from the start and end days.

Does this work in Google Sheets?

Yes, Google Sheets uses the exact same NETWORKDAYS and NETWORKDAYS.INTL syntax as Microsoft Excel, so these formulas are cross-compatible.

How do I count only Mondays and Wednesdays?

You cannot do this with NETWORKDAYS. You would need to use a more complex formula involving SUMPRODUCT and the WEEKDAY function to count only specific days of the week across a date range.

What happens if the start date is after the end date?

Excel will return a negative number. For example, if the start date is January 31 and the end date is January 1, the result will be -21 (or however many workdays are in that period). To avoid this, you can wrap your formula in =ABS() to always get a positive number.

Can I use this to calculate payroll?

Yes, this is a common way to determine the number of billable days in a month. Just ensure your holiday list is updated annually to account for shifting dates like Easter or Thanksgiving.

Is there a way to count workdays across multiple years?

Yes, the NETWORKDAYS function is not limited to a single month. You can enter a start date in 2023 and an end date in 2025, and it will accurately calculate every business day in between, provided your holiday range covers all those years.