Day of Year Calculator

Find a date's ordinal day number and the days remaining in its year.

This tool runs entirely in your browser. Your files are never uploaded to a server.

Day 1

364 days remain in the year

What this tool does

Finds a date's ordinal position within its calendar year — day 1 for January 1st up to day 365 or 366 for December 31st — and shows how many days remain in that year.

How to use it

Pick a date, and the day-of-year number and remaining-days count update immediately. Reset returns to the default example of 2026-01-01.

Worked example

2026-01-01 is Day 1, with 364 days remaining in 2026 (a 365-day common year). 2026-07-01 is Day 182, since 181 days (January through June) have already passed — 31 + 28 + 31 + 30 + 31 + 30 = 181.

Method

The date is parsed and rebuilt as a UTC date, and the ordinal day is the number of whole days between January 1st of that year and the chosen date, plus one. The days-remaining figure subtracts that ordinal day from the year's total length (365 or 366 days).

Leap years and year length

The year length used for the remaining-days figure follows the standard Gregorian rule: divisible by 4, except century years, unless also divisible by 400. So 2024 and 2028 are 366-day leap years, while 2026, 2027, and the century year 2100 are 365-day common years.

Limitations

This only accepts a date typed or picked in the standard YYYY-MM-DD form and validates it strictly — an out-of-range value like 2026-02-30 is rejected rather than silently rolled forward to March, since the tool re-checks that the parsed date converts back to the exact string you entered. It also only supports the Gregorian calendar, not other calendar systems.

Privacy and processing

The calculation runs entirely in your browser using JavaScript. The date you enter is never uploaded or stored.

Frequently Asked Questions

How is the day-of-year number calculated?
It counts the whole days from January 1st of that year up to and including the chosen date — so January 1st is always day 1, and December 31st is day 365 (or 366 in a leap year).
What happens if I enter an invalid date like February 30?
The tool shows an error rather than silently rolling the date forward, because it checks that the parsed date converts back to exactly the string you typed.
Does the day count differ in a leap year?
Yes — the days-remaining figure uses 366 total days in a leap year (divisible by 4, except century years not divisible by 400) instead of 365.
Is this the same as an ISO week number?
No, this counts calendar days within the year. For the ISO 8601 week number instead, use the Week Number Calculator.