Calculation Number Of Days

Instant date span, business days & live distribution

Day of the Year Calculator

Find a date’s position within the year.

Result
—

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.

  1. Enter a date

    Enter the date to convert.

  2. Count from 1 January

    The calculator subtracts 1 January of the same year from the date.

  3. Add 1

    1 January is day 1, not day 0.

  4. 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.

DateCommon yearLeap year
1 January11
1 February3232
1 March6061
1 April9192
1 May121122
1 June152153
1 July182183
1 August213214
1 September244245
1 October274275
1 November305306
1 December335336

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.