Day of Year Calculator | Julian Day Number

Day of Year Calculator

Find which day number (1-365/366) any date is. Track year progress and see how much time remains.

Last updated: March 2026

What is Day of Year?

Day of year (DOY) is the sequential day number within a calendar year, ranging from 1 (January 1) to 365 or 366 (December 31). This ordinal date system provides a largely unambiguous way to reference dates without month names—useful in scientific data, logistics, agriculture, and programming where numeric day counting simplifies calculations. This tool uses UTC-based calculations to reduce timezone and DST-related offsets; it does not attempt to handle historical calendar reforms.

The system is particularly valuable in fields tracking seasonal patterns. Meteorologists use DOY to compare weather across years (e.g., "temperature on day 100 for the past decade"). Farmers track planting schedules by day number rather than calendar date, as growing seasons follow solar patterns better expressed in sequential days. Astronomers and space agencies use DOY extensively—NASA mission logs often reference "day 185" rather than "July 4."

Leap years add complexity: every year divisible by 4 is a leap year (366 days), except century years unless divisible by 400. So 2000 was a leap year (divisible by 400), but 1900 was not (century year not divisible by 400). This means day 60 is February 29 in leap years, March 1 in regular years, shifting all subsequent day numbers by one until year-end.

How Day of Year is Calculated

The Calculation Method

Step 1: Get the target date's timestamp
Step 2: Get January 0 (day 0) of that year's timestamp (so Jan 1 → day 1)
Step 3: Calculate difference in milliseconds
Step 4: Convert to days (÷ 86,400,000 ms)
Step 5: Round down to get day number

Notable Day Numbers

Day 1: January 1 (New Year)
Day 32: February 1
Day 60/61: Feb 29 (leap) / Mar 1
Day 100: April 9/10
Day 182: July 1 (midpoint)
Day 365/366: December 31

Example Calculation

Calculate day of year for March 19, 2026:

Given:
Date: March 19, 2026
Year: 2026 (not a leap year)
Step 1:
Count days in previous months:
January: 31 days
February: 28 days (not leap year)
Total: 31 + 28 = 59 days
Step 2:
Add days in current month:
March 19 = 19 days into March
Total: 59 + 19 = 78
Step 3:
Calculate remaining days:
Total days in year: 365 (not leap)
Remaining: 365 - 78 = 287 days
Progress: (78 ÷ 365) × 100 = 21.4%
Final Result:
Day 78
21.4% through the year
287 days remaining in 2026

Frequently Asked Questions

Why do some systems start at day 0 vs day 1?

Most calendar systems use day 1 for January 1. However, some programming systems use day 0 as January 1, making December 31 day 364/365. This calculator uses the standard day 1 convention.

How do leap years affect day numbers?

In leap years, February has 29 days instead of 28. This means from March 1 onward, every date's day number is one higher than in non-leap years. Day 60 is Feb 29 (leap) or Mar 1 (non-leap).

What is day 182 special?

Day 182 (July 1 in non-leap years, June 30 in leap years) is the midpoint of the year—exactly halfway through. It's sometimes celebrated as 'Half New Year.'

Can I use this for dates in other years?

Yes! The calculator works for any year. Just enter your desired date and it will calculate the correct day number, accounting for whether that specific year is a leap year.

Why is this useful for agriculture?

Growing seasons follow solar patterns better expressed in day numbers than calendar dates. 'Plant on day 100' is more consistent across years than 'plant on April 10,' which might be day 100 or 101.

What's the ISO 8601 ordinal date format?

ISO 8601 expresses dates as YYYY-DDD (e.g., 2026-078 for day 78 of 2026). This is common in scientific and technical contexts for unambiguous date representation.

How do quarters relate to day numbers?

Q1 = days 1-90/91, Q2 = 91/92-181/182, Q3 = 182/183-273/274, Q4 = 274/275-365/366. The exact boundaries shift by one day in leap years after February.

Can I calculate which date is day X?

While this tool converts dates to day numbers, you can work backwards: for day 100 in 2026 (non-leap), that's 31 (Jan) + 28 (Feb) + 41 more = April 10.

Related Tools