Day of Year Calculator
Turn any date into day number 1 to 366 with weekday.
What it does
Ordinal dates number days from Jan 1 without months. Logistics, warranties, and data logs use day 185 instead of July 4 to sort and subtract cleanly. Leap years shift every date after February.
The tool above takes a Gregorian date and returns day number, days left, and weekday. The default 2026-01-01 matches the worked example, so the page opens showing 1 of 365. Pick a new date to update all three results.
Counting uses UTC midnights to dodge daylight saving. Day number is midnights since Jan 1 plus one. Remaining is year length minus day number. Year length is 366 when divisible by 4 except centuries not divisible by 400.
Use this for schedules, age in days numerators, and file naming. For spans between two dates use a date difference tool. For week numbers use a week tool.
This page shows the rules, one full hand checked example at 2026-01-01, a reference table, and practice checks that run through the tool.
How to use
- Pick the calendar date.
- Keep years 1801 to 2099 for this compact form.
- Read Day number as n of 365 or 366.
- Read Days left to year end.
- Read weekday to cross check the calendar.
- Use day numbers to subtract spans by hand.
Formula
- Jan 1
- Day 1 at 00:00 UTC.
- leap
- 366 days when divisible by 4 except centuries not by 400.
- left
- Days after this date in the year.
Feb 29 exists only in leap years and is day 60. Invalid dates like Feb 30 stop with an error.
Worked example
Example: 2026-01-01
Find day number for Jan 1, 2026.
- Jan 1 is start, so day 1 of 365.
- 2026 is not leap, so length 365.
- Left: 365 minus 1 = 364 left.
- Weekday: Jan 1, 2026 is Thursday.
- Check: Jan 2 would be day 2.
- Spans: subtract day numbers within the year.
Reference table
| Date | Day | Weekday |
|---|---|---|
| 2026-01-01 | 1 of 365 | Thursday |
| 2026-07-04 | 185 of 365 | Saturday |
| 2024-02-29 | 60 of 366 | Thursday |
| 2024-12-31 | 366 of 366 | Tuesday |
Limits
- Years 1801 to 2099 only.
- Gregorian only. Julian calendar dates need other tables.
- UTC dates. Time zones can shift the calendar day.
- No time of day here. Use Julian date for fractions.
Common mistakes
- Calling July 4 day 185 in leap years. Leap shifts to 186.
- Forgetting Feb 29 exists only some years.
- Using local midnight instead of UTC near zone edges.
- Reading day 60 as March 1 in leap years. It is Feb 29.
- Typing Feb 30, which the tool rejects.
Try it yourself
Quick checks. Answers sit tucked under each question.
2026-07-04?
185 of 365, 180 left, Saturday.
2024-12-31?
366 of 366, 0 left, Tuesday.
Questions
Jan 1 number?
1 of 365 or 366.
Leap?
366 days when divisible by 4 except centuries not by 400.
Feb 29 number?
60 of 366.
Days left?
Year length minus day number.
Weekday?
From UTC calendar math.
Span?
Subtract day numbers within one year.