How to Use Day of Year Calculator
The Day of Year Calculator quickly converts between calendar dates and ordinal day numbers.
- Pick a mode — Convert a date to a day-of-year number, or convert a day-of-year number to a date.
- Enter the year — Required so leap years can be handled correctly.
- Enter the date or day number — Depending on the chosen mode.
- Read the result — The Day of Year Calculator shows the day number, ISO week, days remaining in the year and a percentage of the year completed.
Formula & Theory - Day of Year Calculator
The day of year n for a date (y, m, d) is computed by summing the lengths of all months before m and adding d:
n = sum(monthLength[1..m-1]) + d
monthLength[2] = 29 if isLeap(y) else 28
isLeap(y) = (y % 4 == 0 and y % 100 != 0) or (y % 400 == 0)
The progress percentage uses the year length:
daysInYear = 366 if isLeap(y) else 365
progress = n / daysInYear * 100%
remaining = daysInYear - n
The ISO 8601 week number is the week containing the first Thursday of the year; this calculator follows the standard recursive definition implemented on UTC dates.
Use Cases for Day of Year Calculator
The Day of Year Calculator is widely used in:
- Scientific data — Many climate and astronomy datasets store dates as ordinal day-of-year values.
- Project tracking — Quickly see how much of the year is gone.
- Operations — Tag files with a 3-digit day number for compact, sortable archive names.
- Education — Teach students how leap years interact with month lengths.
- Forex and trading — Reference ordinal trading days in backtests.
- Personal planning — Find out exactly how far the year has progressed and how many days remain.
Because everything runs locally in your browser, the Day of Year Calculator is private, fast, and works offline once loaded.