Developer and Text Tools

Finding the Nth Weekday of a Month and Other Date Rules

How to find dates like the 4th Thursday or last Friday of a month, export them to a calendar, and work out midpoints, offsets and working-day counts.

Saizul Amin
Saizul Amin3 Nov 2026 · 4 min read
Finding the Nth Weekday of a Month and Other Date Rules

Finding the Nth Weekday of a Month and Other Date Rules

Plenty of important dates are rules rather than fixed numbers. Payroll runs on the last Friday, a user group meets on the first Tuesday, security patches arrive on the second Tuesday, and many public holidays are "the third Monday of" something. Developers building schedulers, and anyone planning a year of meetings, need those dates quickly and correctly. The free Nth Weekday and Date Midpoint Finder handles them along with midpoints, offsets and day counts.

The simple arithmetic behind nth weekdays

The first Monday of any month must fall on day 1 to 7, the second on day 8 to 14, the third on 15 to 21 and the fourth on 22 to 28. A fifth Monday exists only if the month has 29 or more days and the first Monday fell early enough. For the last weekday, start at the final day of the month and walk backwards until the weekday matches.

That is all the tool does internally, but it saves you the off-by-one errors that creep in when this logic is written by hand. A common bug is to treat "the fifth Friday" as always existing and silently return a date in the next month. The finder reports instead that the month has no such day.

Typical rules to try

  • US Thanksgiving: fourth Thursday of November. In 2026 that is 26 November.
  • US Memorial Day: last Monday of May, 25 May in 2026.
  • Patch Tuesday: second Tuesday of each month, 10 November in 2026.
  • End-of-month payroll on the last Friday.
  • A board meeting on the first Monday of each quarter.

Preset buttons load several of these. Holiday laws do change, and some countries move holidays in particular years, so check the official calendar for anything legally binding.

Building a year of dates

Once the rule is set, the yearly list repeats it for every month, a single month or quarterly months, up to 50 years ahead. Download it as CSV for a spreadsheet, or as an .ics file that Google Calendar, Outlook and Apple Calendar can import as all-day events. This is a fast way to fill a team calendar with recurring meetings or to produce test fixtures for a recurrence engine.

If you are testing RFC 5545 rules such as BYDAY=4TH or BYDAY=-1FR, compare your engine's output with the list. Mismatches usually come from time-zone handling or from how the engine treats months without a fifth occurrence.

The halfway date

Midpoints are useful for project check-ins, mid-term reviews, half-time reports on grants and, privately, for the halfway point of a pregnancy or a long trip. Enter two dates and the tool counts the days between them and gives the midpoint. When the number of days is odd, the exact middle falls at noon, and the tool says so instead of hiding the half day. Quarter points are listed as a bonus.

Moving a date by an offset

The offset tab answers questions like "what date is 90 days from today?" or "six months after 31 August?". Days and weeks are straightforward. Months keep the day number and clip at shorter months, so six months after 31 August 2026 is 28 February 2027. Working days skip the weekend days you choose and any holidays you list, which is what notice periods and service-level deadlines often require.

Counting days properly

The count tab includes both the start and end dates. Between 1 March and 31 December 2026 that is 306 days. With a Saturday and Sunday weekend, 87 of them are weekend days, and with two listed holidays on weekdays there are 217 working days. The tool also shows how many Mondays, Tuesdays and so on are in the range, which helps when a class runs on fixed weekdays.

Weekends differ around the world. Several countries use Friday and Saturday; some businesses close only on Friday or only on Sunday. Tick the days that apply to you, and paste public holidays as a simple list of dates.

When to be careful

Whether a count should include the first day is a policy choice. Hotel stays count nights, many legal deadlines exclude the day of the event, and some contracts count only business days. The tool gives the inclusive count; adjust it to your rule and, for legal deadlines, follow the rules that apply to you rather than any calculator.

All calculations run in the browser on whole calendar days, without time zones, so results are the same wherever you are.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages