Day of Year Calculator
Calculate what day of the year any date falls on with year progress.
Select Date
Saturday, July 18, 2026
Year Progress
Date Details
What Is the Day of the Year?
The day of the year (also called the ordinal date or Julian day within a year) is the sequential number of a specific date counting from January 1 as day 1. January 1 is day 1, December 31 is day 365 in ordinary years and day 366 in leap years. This compact representation replaces the month-day pair with a single integer, simplifying date arithmetic and enabling efficient year-over-year comparisons.
The day of the year is the standard date format used in meteorology for climate normals, in agriculture for growing season tracking, in military operations for concise date references, and in astronomy for various calculations. When meteorologists report that the historical average first frost date is "day 285," they mean October 12 (or 13 in a leap year) — a date you can look up regardless of the year.
This calculator shows the day of year for any selected date, the total days in that year, the days remaining until December 31, and the percentage of the year that has elapsed — giving you a complete picture of where any date falls within its annual cycle.
Day of Year Formula
The day of year is computed by accumulating the days in all months before the target month and adding the day of the target month.
Ordinal Date Formula
Where:
- Standard year= Jan:31, Feb:59, Mar:90, Apr:120, May:151, Jun:181, Jul:212, Aug:243, Sep:273, Oct:304, Nov:334, Dec:365
- Leap year= Same as standard year but all offsets from March onward are +1; Feb 29 = day 60
- Year end= Day 365 (standard) or day 366 (leap) = December 31
- Percent elapsed= (Day of Year / Total Year Days) × 100
Meteorological and Agricultural Uses
Climate scientists express seasonal patterns using day-of-year numbers to make year-over-year comparisons clean and leap-year-independent from March onward. A phenological event like "cherry blossoms peak at day 100" translates to April 10 in most years. Long-term climate records spanning decades use day-of-year as the x-axis in climate normal calculations, where averaging across many years is simpler with ordinal dates.
Agricultural extension services publish planting calendars in day-of-year format: corn should be planted between days 120-140 (April 30 to May 20) in many US regions. This is more compact and easier to apply year-to-year than calendar-date instructions that shift with Easter and other variable holidays in regional planting advice.
Day of Year in Computing
Most programming languages provide built-in functions to compute the day of year from a date object. In Python, datetime objects have a timetuple().tm_yday attribute. In JavaScript, (date - new Date(year, 0, 0)) / 86400000 gives the day of year. In SQL, DATE_PART('doy', date) returns the ordinal day in PostgreSQL. The compactness of a single integer makes it efficient for sorting, filtering, and indexing in date-sensitive databases.
In compressed or fixed-width date formats (like YYDDD used in some batch processing and COBOL systems), the day of year replaces the month-day pair with a three-digit number (001-366), saving one character compared to MMDD while remaining unambiguous. This YYDDD format is still encountered in mainframe-era data processing systems.
How Leap Years Affect Day of Year
The key difference between leap and standard years is that February 29 inserts as day 60, shifting all subsequent day numbers by 1. March 1 is day 60 in standard years but day 61 in leap years. Any time-series analysis that uses day-of-year numbers across multiple years must account for this shift to prevent spring events from appearing one day earlier in leap years compared to non-leap years.
One common workaround in climate science is to define a "365-day year" baseline by either ignoring February 29 leap days in all years, or interpolating between day 59 and day 61 in leap years to maintain a consistent 365-day axis. Different scientific communities use different conventions; this calculator always reports the actual day number in the actual year.
Worked Examples
Day of Year for June 15
Problem:
What is the day of year for June 15 in 2025 (non-leap)?
Solution Steps:
- 1Jan: 31, Feb: 28, Mar: 31, Apr: 30, May: 31 = 151 total days through May
- 2Add June 15: 151 + 15 = 166
- 3Days remaining: 365 - 166 = 199
- 4Percent elapsed: 166/365 × 100 = 45.5%
Result:
June 15, 2025 is day 166 of 365 (45.5% of the year elapsed; 199 days remaining).
Day of Year for February 29 (Leap Year)
Problem:
What is the day of year for February 29, 2024?
Solution Steps:
- 1January: 31 days (day 31)
- 2February: add 29 days (February 29 = day 31 + 29 = day 60)
- 3Total days in 2024: 366
- 4Percent elapsed: 60/366 × 100 = 16.4%
Result:
February 29, 2024 is day 60 of 366 in this leap year (16.4% elapsed).
Finding Date from Day Number
Problem:
Day 250 of a non-leap year — what calendar date?
Solution Steps:
- 1Cumulative: Jan 31, Feb 59, Mar 90, Apr 120, May 151, Jun 181, Jul 212, Aug 243, Sep 273
- 2Day 250 > 243 (Aug end) and ≤ 273 (Sep end): it falls in September
- 3Day within September: 250 - 243 = 7
- 4Day 250 = September 7
Result:
Day 250 of a non-leap year is September 7.
Tips & Best Practices
- ✓Day 100 = April 10 (standard) / April 9 (leap) — a useful mental anchor for the first quarter of the year.
- ✓Day 182 = July 1 (standard) — the approximate midpoint of the year, useful for half-year reviews.
- ✓For data analysis across years, always record both the year and the day number — the day number alone is ambiguous without the year.
- ✓Agricultural reports often specify planting windows as day ranges (e.g., days 120-140) — convert to your local calendar dates with this tool.
- ✓In leap years, any date from March 1 onward has a day number one higher than in non-leap years — account for this in time-series comparisons.
- ✓The 365-to-366 day-count shift in leap years means that 'day 300' falls on October 27 in standard years and October 26 in leap years.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-06
Help us improve!
How would you rate the Day of Year Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various