What this calculator does
The Nth Weekday of the Month Calculator finds the exact calendar date of a recurring weekday rule such as "the 3rd Monday of January" or "the 1st Friday of December." These rules are everywhere: US federal holidays (Thanksgiving is the 4th Thursday of November), monthly meetings, payroll dates, options-expiration Fridays, and scheduled bills. Instead of counting boxes on a calendar, you simply choose the year, month, occurrence, and weekday, and the tool returns the day of the month.
How to use it
Pick the year and month, choose which occurrence you want (1st through 5th), and select the weekday. The calculator returns the matching day of the month. It also tells you whether that occurrence actually exists — a 5th weekday only happens in some months — and shows the day of the first matching weekday so you can see the whole series (add 7 for each later occurrence).
The formula explained
First we determine the weekday of the 1st of the month, called f (1 = Sunday through 7 = Saturday). To reach the first occurrence of the target weekday w, we add an offset of \((w - f + 7) \bmod 7\) days. Each additional occurrence is exactly 7 days later, so the nth occurrence lands on:
$$\text{day} = 1 + \big((w - f + 7)\bmod 7\big) + (n - 1) \times 7$$
If this value exceeds the number of days in the month, that occurrence does not exist (for example, there is no 5th Tuesday in a month where Tuesdays fall on the 1st, 8th, 15th, 22nd, and 29th only when the month has at least 29 days).
Worked example
Find the 3rd Monday of January 2024. January 1, 2024 is a Monday, so \(f = 2\) and \(w = 2\). The offset is \((2 - 2 + 7) \bmod 7 = 0\), so the first Monday is the 1st. The 3rd Monday is $$1 + 0 + (3 - 1) \times 7 = \mathbf{15}.$$ So the date is January 15, 2024 — which was indeed Martin Luther King Jr. Day.
FAQ
What weekday numbering is used? Sunday = 1 through Saturday = 7, the same as the input dropdown.
Why does it say the occurrence does not exist? Some months only have four of a given weekday. If you ask for the 5th and there are only four, the calculated day exceeds the month length and is flagged as not existing.
Can I find the last weekday of a month? Choose the 5th occurrence first; if it exists it is the last one, otherwise the 4th occurrence is the last.