Day of Year Calculator
Turn any date into its day-of-year number (1–365 or 366), with days remaining, ISO week number, and leap-year status — or go the other way, from a day number to a date.
Date → Day of year
Day of year → Date
How it works
The calculator measures the date against January 1 of the same year using UTC timestamps, which avoids the off-by-one errors that local-time arithmetic can produce around daylight-saving transitions. Dividing the difference by 86,400 seconds and adding one gives the day number. Days remaining is simply the year's length minus the day number. The ISO week number follows the Thursday rule from ISO 8601: the week containing the year's first Thursday is week 1, and every week starts on Monday. Leap years follow the Gregorian rule — divisible by 4, except centuries, which must also be divisible by 400.
Worked examples
- October 17, 2026 → day 290 of 365, 75 days left, ISO week 2026-W42, not a leap year.
- December 31, 2024 → day 366 of 366, 0 days left — 2024 was a leap year.
- January 1, 2026 → day 1 of 365, 364 days left, ISO week 2026-W01.
- Day 100 of 2026 → April 10, 2026 (31 + 28 + 31 = 90 days through March, plus 10).
Edge cases
- Day 366 in a common year is rejected — the reverse converter tells you the year has only 365 days.
- February 29 only exists in leap years; in 2026 the date picker will not offer it.
- ISO week 53 occurs only in some years (e.g. 2026 has 52 weeks, so the calendar rolls into 2026-W01 right after 2026-W52).
- Year boundaries: January 1, 2027 belongs to ISO week 2026-W53 — the calculator shows the ISO year explicitly.
Frequently asked questions
Is January 1 day 0 or day 1?
Day 1. Ordinal dates count January 1 as day 1 and December 31 as day 365 (or 366 in a leap year). So February 1 is day 32 in a common year: 31 days of January plus 1.
How do leap years change the day-of-year count?
In a leap year, February 29 becomes day 60, which pushes every later date one number higher than in a common year. December 31 is day 366 instead of 365. The calculator detects leap years automatically using the full Gregorian rule (divisible by 4, except centuries unless divisible by 400).
How is the ISO week number calculated?
ISO 8601 defines week 1 as the week containing the year's first Thursday, and weeks start on Monday. Practically: take the Thursday of the date's week, count how many whole weeks that Thursday is after the first Thursday of its ISO year. The result is shown like "2026-W42".
Can the ISO week year differ from the calendar year?
Yes. Dates near New Year can belong to the neighbouring year's ISO week calendar. For example, January 1, 2027 is in ISO week 2026-W53, not 2027-W01. The calculator always shows the ISO week year next to the week number so there is no ambiguity.
What are day-of-year numbers used for?
They appear as ordinal dates (YYYY-DDD) in computing, astronomy, and logistics — 2026-290 means day 290 of 2026. Spreadsheets, date-difference formulas, and manufacturing date codes often use them because a single number is easier to subtract than a month/day pair.
Related tools
All calculations run in your browser using the Gregorian calendar. No data leaves your device.