Date & Time

Day of the Week Calculator

Find out which day of the week any date falls on.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

About this calculator

The weekday of a date follows a fixed cycle that shifts by one day each year and by two across a leap year. This works for any date in the Gregorian calendar.

Worked example

calculated with the default values below

Date 2026-10-31 Weekday Saturday · Weekday number (0 = Sunday) 6 · Day of the year 304 days · Days in the year 365 days · Days remaining in the year 61 days

General background references

Disclaimer

These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

n = (D − Jan 1) ÷ 86400000 + 1; r = N − n

D
Date
n
Day of year
N
Days in year
r
Days remaining
w
Weekday index (0=Sun)

N = 365 or 366 in a leap year; w runs 0 (Sunday) to 6 (Saturday).

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why does the day-of-year output change in a leap year?

Beyond the weekday, the tool returns the day number within the year and days remaining, computed from 1 January to 31 December. A leap year has 366 days, so 29 February is day 60 and the year ends on day 366, shifting every later date's remainder by one versus a common year. The weekday index uses 0 for Sunday.