Date → Day of Year
Find the day number (1-365 or 1-366) for any date.
Day of Year → Date
Convert a DOY value back into a month/day date.
What is a DOY calculator?
A DOY calculator converts a regular calendar date into its day of year number. In this system, January 1 is day 1, January 2 is day 2, and so on. By December 31, the value is day 365 in a common year, or day 366 in a leap year.
DOY (day of year) is often called an ordinal date. It is widely used in analytics, logging, planning, agriculture, and engineering because it makes date math simpler and more consistent.
How to use this calculator
1) Convert a date to DOY
- Select any date in the left panel.
- Click Calculate DOY.
- You will see the day number, leap-year status, and days remaining in the year.
2) Convert DOY back to a date
- Enter a year (for example, 2026).
- Enter a DOY value (for example, 200).
- Click Convert to Date to get the calendar date.
Why day-of-year is useful
Using day numbers can reduce ambiguity and speed up calculations. Instead of comparing full timestamps, teams can use simple integer values.
- Project planning: Define milestones as “DOY 120” instead of “April 29.”
- Data pipelines: Partition files by year + DOY for cleaner storage.
- Agriculture: Track planting windows and crop growth stages.
- Scientific logs: Match observations from multiple instruments quickly.
- Manufacturing and QA: Timestamp runs and batches with compact date codes.
Leap year rules you should know
Leap years affect DOY values after February. The rules are:
- If a year is divisible by 4, it is usually a leap year.
- If it is divisible by 100, it is not a leap year.
- If it is divisible by 400, it is a leap year.
That means 2024 is a leap year, 2100 is not, and 2000 is.
Manual DOY calculation (quick method)
If you need to do it by hand:
- Add the days in all months before the current month.
- Add the day of the month.
- If the date is after February in a leap year, add 1.
Example: March 15, 2026 (not leap year): 31 (Jan) + 28 (Feb) + 15 = 74.
Common mistakes to avoid
- Confusing DOY with Julian Date (astronomy uses a different scale).
- Ignoring leap years when converting late-year values.
- Using timezone-shifted timestamps when you only need a calendar date.
- Assuming DOY 365 always means December 31.
FAQ
Is DOY the same as ISO week number?
No. ISO week numbers group dates into weeks (1-53). DOY is a straight daily count (1-365/366).
Can DOY be used in filenames?
Yes. A common pattern is YYYY-DOY, such as 2026-047. It sorts well and is compact.
Does this calculator support leap years automatically?
Yes. Both conversion directions validate leap-year limits so you get correct results for all valid dates.
Bottom line
A DOY calculator is a practical tool for anyone who works with schedules, data, or recurring annual events. Use the calculator above to convert instantly, avoid leap-year errors, and keep your date logic clean.