How to count the number of Mondays between two dates in Excel
Formula (Excel and Google Sheets)
=SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1))List the dates with SEQUENCE and count the Mondays: =SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=2)).
- Result on the example
- one result per row in
D2, filled down toD5 - Works in
- Excel 2021, 2024 and Microsoft 365
- Google Sheets
- Same formula
See it work
The formula is already in D2, filled down to D5. Change any input and the result updates, or edit the formula to experiment.
How it works
SEQUENCE lists every date from the start to the end, WEEKDAY turns each into 1 (Sunday) to 7 (Saturday), and SUMPRODUCT counts the ones equal to G1. Both the start and the end date are included.
=SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1))Result18
C25/15/2026The value in C2.
B21/12/2026The value in B2.
C2-B2123The - operator subtracts.
C2-B2+1124The + operator adds.
SEQUENCE(C2-B2+1,1,B2){124 rows × 1 col} 46034, 46035, 46036, 46037, …SEQUENCE: A grid of sequential numbers. Spills.- rows
C2-B2+1124 - columns
1 - start
B21/12/2026
- rows
WEEKDAY(SEQUENCE(C2-B2+1,1,B2)){124 rows × 1 col} 2, 3, 4, 5, …WEEKDAY: Day of the week as a number; Sunday = 1 by default.- serial_number
SEQUENCE(C2-B2+1,1,B2){124 rows × 1 col} 46034, 46035, 46036, 46037, …
- serial_number
$G$12The value in G1.
WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1{124 rows × 1 col} TRUE, FALSE, FALSE, FALSE, …The = operator tests whether the two sides are equal.
-(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1{124 rows × 1 col} -1, 0, 0, 0, …Makes the value negative.
--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1{124 rows × 1 col} 1, 0, 0, 0, …Makes the value negative.
SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1))18SUMPRODUCT: Multiplies arrays row by row and adds the results.- array1
--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1{124 rows × 1 col} 1, 0, 0, 0, …
- array1
In Google Sheets
The same formula works in Google Sheets: =SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2))=$G$1)). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =INT((C2-B2+WEEKDAY(B2-$G$1))/7) | 18, 9, 13… | A shortcut that works in every version, without listing the dates. |
Common mistakes
- If the end date is before the start date, SEQUENCE gets a size below 1 and the formula returns an error.
- Weekday numbers start at Sunday = 1: Monday is 2 and Friday is 6.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Count the number of Mondays between two dates
D2, count how many days from start to end fall on the weekday in G1 (2 for Monday), and fill down to D5.Questions
How do I count the Mondays in a month?
Use the first and last day of the month as start and end, with EOMONTH(date,-1)+1 and EOMONTH(date,0).
How do I count the weekend days between two dates?
=SUMPRODUCT(--(WEEKDAY(SEQUENCE(C2-B2+1,1,B2),2)>5)).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.