Day of Year Calculator

Turn any date into day number 1 to 366 with weekday.

Other ToolsUpdated 2026-10-161 min read
Day of Year Calculator
Gregorian date 1801 to 2099.
Day number
...
Days left...
Day of week...

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

  1. Pick the calendar date.
  2. Keep years 1801 to 2099 for this compact form.
  3. Read Day number as n of 365 or 366.
  4. Read Days left to year end.
  5. Read weekday to cross check the calendar.
  6. Use day numbers to subtract spans by hand.

Formula

Day = midnights since Jan 1 UTC + 1. Left = year length minus day.
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.

  1. Jan 1 is start, so day 1 of 365.
  2. 2026 is not leap, so length 365.
  3. Left: 365 minus 1 = 364 left.
  4. Weekday: Jan 1, 2026 is Thursday.
  5. Check: Jan 2 would be day 2.
  6. Spans: subtract day numbers within the year.

Reference table

Day numbers for anchors
DateDayWeekday
2026-01-011 of 365Thursday
2026-07-04185 of 365Saturday
2024-02-2960 of 366Thursday
2024-12-31366 of 366Tuesday

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.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.