Day of the Year Calculator
Find a date’s position within the year.
How the Day of the Year Calculator Works
The Day of the Year Calculator converts a calendar date into its ordinal day number, from 1 on 1 January up to 365 or 366 on 31 December.
Enter a date
Enter the date to convert.
Count from 1 January
The calculator subtracts 1 January of the same year from the date.
Add 1
1 January is day 1, not day 0.
Read the year total
The note shows whether the year holds 365 or 366 days.
How the Count Is Calculated
The Day of the Year formula adds the days of the full months before the date to the day of the month.
Day of year = Days in all full months before the date + Day of month
(+1 after February, if the year is a leap year)- Full months before
- Months that end before the date.
- Day of month
- The date number, 1 to 31.
- Leap adjustment
- Dates from 1 March onward gain 1 in leap years.
Example: 4 December 2026 = 334 days (January to November) + 4. 4 December 2026 is day 338 of the year.
Worked Examples
The table lists the day-of-year number of the 1st of each month.
| Date | Common year | Leap year |
|---|---|---|
| 1 January | 1 | 1 |
| 1 February | 32 | 32 |
| 1 March | 60 | 61 |
| 1 April | 91 | 92 |
| 1 May | 121 | 122 |
| 1 June | 152 | 153 |
| 1 July | 182 | 183 |
| 1 August | 213 | 214 |
| 1 September | 244 | 245 |
| 1 October | 274 | 275 |
| 1 November | 305 | 306 |
| 1 December | 335 | 336 |
What the Tool Measures
A Day of the Year Calculator is a tool that returns the ordinal day number of a date within its year. Programmers call the value the ordinal date, and ISO 8601 writes the value as YYYY-DDD, such as 2026-338.
Many people call the ordinal date a "Julian date", but that name belongs to the Julian Day Number (JDN) used in astronomy. Food packaging, military logistics and logging systems use ordinal dates.
When to Use This Tool
There are 5 main uses of the Day of the Year Calculator, including manufacturing codes and data logs.
Batch and lot codes
Food and drug makers print day-of-year codes on packages.
Data logging
Scientists label daily readings by day of year.
Challenge tracking
People track progress in 365-day challenges.
Programmer’s Day
Developers celebrate day 256 (13 September in common years).
Seasonal analysis
Analysts compare the same day of year across several years.