Day of Year Calculator
Determine the ordinal day of the year (1–365 or 1–366) for any Gregorian calendar date—perfect for project timelines, fiscal planning, or translating timestamps into Julian-style day counts.
For regulatory deadlines, orbital mechanics, or scientific publications, verify calculations against authoritative ephemeris data or official timekeeping software.
Examples
- 2024-01-01 ⇒ Day 1 (leap year begins)
 - 2024-12-31 ⇒ Day 366 (leap year total)
 - 2025-03-01 ⇒ Day 60 (non-leap year)
 - 2030-07-15 ⇒ Day 197 (mid-July checkpoint)
 
FAQ
Does the calculator account for leap years?
Yes. The formula checks the year and inserts February 29 when the Gregorian leap-year rules are met.
What if I enter an invalid date like April 31?
Ensure that the day exists in the selected month. Out-of-range values will yield incorrect results, so adjust before calculating.
Can I use this for Julian calendar conversions?
No. Historical Julian calendars follow a different leap-year pattern. Use a specialist astronomical converter for pre-1752 dates in many regions.
How can I convert the day number back to a calendar date?
Subtract month lengths sequentially from the day number until the remaining value fits within a month. Spreadsheet functions such as DATE and DATEVALUE can automate this step.
Additional Information
- Leap years follow the Gregorian rule: divisible by 4, except centuries not divisible by 400.
 - Day-of-year values run from 1 to 365 in common years and 1 to 366 when a leap day (February 29) occurs.
 - Use the output to compare milestones, convert to Julian day numbers, or track progress within annual goals.