Day of Year Calculator
Day of year calculator
Get day index within the year (1-365 or 1-366).
Result
Day 186
Includes leap-year handling automatically.
Formula
Day of year = floor((date - Jan 1)/1 day) + 1 Symbol legend
| Symbol | Meaning | Unit | Copy |
|---|---|---|---|
N | Day index in year | 1 to 365 or 366 | |
D | Selected date instant | date-time |
- Compute elapsed full days since first day of year.
- Add one because Jan 1 is day index 1.
- Adjust automatically for leap years.
Example
Worked example: 2026-06-06
- 1 Count days from Jan 1 to Jun 6
- 2 Include Jan 1 as day 1
- 3 Output index = 157
Date 2026-06-06 is day 157 of the year.
How
- Select a date.
- Run the day-index calculation.
- Read the day-of-year value.
Avoid
- Forgetting leap-year impact after February.
- Using zero-based day counting.
- Confusing day-of-year with week number.
Checks
Best fit
Day of Year Calculator is built for calculate day index within the year, including leap-year handling. If Day of Year Calculator does not match the input scope, compare the answer with a second method.
Input check
Check N before calculating: it means day index in year and is measured in 1 to 365 or 366.
Sanity check
For Day of Year Calculator, use the worked example as a quick benchmark: Date 2026-06-06 is day 157 of the year. If the day of year calculator answer is far away, check whether an input, unit, or mode changed.
Before copying
Review this common issue first: forgetting leap-year impact after february.
FAQ
What is the maximum day index?
365 in common years and 366 in leap years.
Is January 1 day zero or day one?
This calculator uses day one convention.
Can this help with CSV date transforms?
Yes, ordinal day values are often used in data pipelines.
Switch
Switch12
No match.