Day of Year Calculator
Enter any date and instantly find its day number in the year (1–366), how many days remain, the day of the week, the ISO week number and how far the year has progressed.
Find the Day Number of Any Date
Day of Year Formula
Where:
- \(N\) — day of the year (ordinal day number, 1–366)
- \(M\) — month number (1 = January … 12 = December)
- \(D\) — day of the month
- \(L\) — leap-year correction (0 or 1)
- \(L_{\text{year}}\) — 1 if the whole year is a leap year, otherwise 0
- \(R\) — days remaining in the year after this date
- \(P\) — year progress in percent
The formula counts the days elapsed from 1 January, where day 1 is 1 January itself. The term \(2\lfloor (M+9)/12 \rfloor\) is 2 for March and later months and 0 for January and February, while \(L\) adds the extra 29 February in leap years.
Day of Year – Calculation Example
Example: find the day of the year for 15 June 2025.
2025 is not a leap year (2025 is not divisible by 4), so \(L = 0\) and the year has 365 days. With \(M = 6\) and \(D = 15\):
\[ N = \left\lfloor \frac{275 \times 6}{9} \right\rfloor - 2\left\lfloor \frac{6+9}{12} \right\rfloor + 15 - 30 + 0 = 183 - 2 + 15 - 30 = 166 \]
\[ R = 365 - 166 = 199, \qquad P = \frac{166}{365} \times 100 \approx 45.5\% \]
Result: 15 June 2025 is day 166 of the year, a Sunday in ISO week 24 of 2025. 199 days remain in the year, which is 45.5% complete.
How to Use the Calculator
- Enter the date in the Date field, using the format YYYY-MM-DD (for example, 2025-06-15). You can also type it as DD.MM.YYYY or DD/MM/YYYY.
- Read the Day of the Year result — the ordinal day number from 1 to 366.
- Check the remaining outputs: Days Remaining in Year, Day of Week, ISO Week Number and Year Progress.
- See the Details section for a plain-language summary, including whether the year is a leap year and the ISO 8601 ordinal date notation.
What Is the Day of the Year?
The day of the year (also called the ordinal day number or ordinal date) tells you exactly how many days have passed since 1 January, counting 1 January itself as day 1. Instead of saying "15 June", you can say "day 166" — a single number between 1 and 366 that uniquely identifies a date within its year. In ISO 8601 notation this is written as 2025-166.
Ordinal day numbers are widely used in logistics, manufacturing, astronomy, programming and project planning, because they make it easy to compare dates, compute elapsed time and label batches or files without ambiguity. A production run stamped with day 304 tells you at a glance that it happened on 31 October of a non-leap year.
The calculator also gives you context around the number: the day of the week, the ISO week number (where week 1 is the week containing the first Thursday of the year), how many days are left before the next year begins, and what percentage of the year has passed. A day of year of 166 in a 365-day year means the year is slightly less than half over — the midpoint falls on 2 July (day 183) in a non-leap year, or 1 July (day 183) in a leap year.
Need related date information? You can count the gap between two dates with the Days Between Dates calculator, check how many days a month has with Days in Month, or find someone's exact age in years, months and days with the Age Calculator.
Leap Years and Reference Points
Leap years shift every ordinal day number from March onward by one. In 2024 (a leap year), 1 March was day 61; in 2025, it was day 60. The calculator detects leap years automatically using the standard rule: a year is a leap year if it is divisible by 4, except century years, which must be divisible by 400 (so 2000 was a leap year, but 1900 was not).
Useful anchor points for a non-leap year:
| Day of year | Date (non-leap year) |
|---|---|
| 1 | 1 January |
| 32 | 1 February |
| 100 | 10 April |
| 183 | 2 July (mid-year) |
| 200 | 19 July |
| 300 | 27 October |
| 365 | 31 December |
In a leap year, all dates from 1 March onward move one day earlier; the year ends on day 366.
Notes and Limitations
- Counting starts on 1 January as day 1 — this matches the ISO 8601 ordinal-date standard. Some systems use a zero-based count; if you need that, subtract 1 from the result.
- The calculation uses the Gregorian calendar and does not account for historical calendar changes (such as the 1752 switch from Julian to Gregorian in Britain and its colonies).
- The ISO week number shown can belong to the previous or next ISO year around New Year — for example, 29 December 2025 falls in week 1 of 2026. The calculator indicates this as "1 of 2026".
- The year progress percentage is based on whole calendar days, not on hours, so day 1 already counts as part of the elapsed year.
- If you type a date manually, make sure it is a real calendar date — the calculator rejects impossible dates such as 30 February and asks you to correct the input.
Frequently Asked Questions
How do I find the day of the year without a formula, just by adding?
Add the number of days in all full months before your date, then add the day of the month. For example, for 15 August: January 31 + February 28 + March 31 + April 30 + May 31 + June 30 + July 31 = 212, plus 15 = day 227 in a non-leap year. In a leap year, add one more if the date falls on 1 March or later. A quick check: 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 are the cumulative day numbers at the end of each month.
How do I convert a day number back to a calendar date?
Find the largest month-end cumulative total that is still smaller than your day number, subtract it, and the remainder is the day of the month. For example, day 304: the largest cumulative total below it is 273 (end of September), and 304 − 273 = 31, so it is 31 October in a non-leap year. Always check for a leap year first, because every number from 61 (1 March) onward shifts back one day.
Is the day of the year the same as a Julian date?
In everyday business usage, "Julian date" often loosely means the ordinal day of the year (for example 2025-166), but technically it is not. The true Julian Day Number (JDN) is a continuous count of days since 1 January 4713 BC, used mainly in astronomy — for 15 June 2025 it is about 2,460,842. Manufacturing and logistics stamps like "24325" usually mean day 243 of 2025, so check the context before relying on the number.
Why does my result differ by one day from another tool or spreadsheet?
The most common cause is an off-by-one convention: this calculator counts 1 January as day 1 (ISO 8601 standard), while some programming systems count from zero. Another frequent mistake is forgetting the leap year — if 29 February has passed, every later date shifts by one. In Excel you can verify with =A1-DATE(YEAR(A1),1,1)+1, which uses the same day-1 convention as this calculator.
What is the highest and lowest possible day number?
The minimum is always 1, which is 1 January itself. The maximum is 365 on 31 December of a non-leap year, or 366 on 31 December of a leap year. Note that the midpoint of the year is day 183 in both cases — 2 July in a non-leap year but 1 July in a leap year — a detail that surprises many people when planning half-year goals or reviews.
Can I use this calculator for historical dates before the Gregorian calendar?
No, results are only meaningful for dates in the Gregorian calendar, which most countries adopted between 1582 and 1923. For example, in Britain and its colonies September 1752 jumped from the 2nd to the 14th when switching from the Julian calendar, so day numbers for that period will not match historical records. For dates after your country's switch, the calculator is fully accurate.
Does 31 December always fall on day 365?
Only in non-leap years. In a leap year, 31 December is day 366, and the extra day 366 comes entirely from 29 February — dates in January and February keep the same day numbers as in a non-leap year, while everything from 1 March onward shifts by one. So "day 300" can mean 27 October or 26 October depending on the year, which is why the year must always be stated alongside an ordinal date.