Day of Year Calculator

The day of the year, or ordinal date, counts how many days have passed since 1 January, giving every date a single running number from 1 to 365 or 366. It is the basis of the ISO 8601 ordinal date format and is widely used in astronomy, aviation, and computing where a single day number is easier to compare than a separate month and day. This calculator takes any date and returns its day number, the number of days remaining in that year, the total days in the year, and whether the year is a leap year, all computed from the standard Gregorian calendar rules.

0.00
0.00
0.00
n/a

Day of year formula

day of year = (date - 1 January of same year) in days + 1
leap year = divisible by 4, not by 100, unless also by 400
total days = 366 if leap year, else 365
days remaining = total days - day of year

1 January is day 1. The leap-year test follows the Gregorian rule exactly, so 29 February shifts every later date forward by one in leap years. Days remaining treats the current day as already counted.

Ordinal date notes

  • ISO 8601 writes the ordinal date as year then day number, for example 2026-168.
  • 1 March is day 60 in a common year and day 61 in a leap year.
  • The year 2000 was a leap year; 1900 and 2100 are not.
  • Astronomers and pilots often use the running day number directly.
  • The last day of any year is day 365 or, in a leap year, day 366.

Day of year: frequently asked questions

What is the day of the year?

The day of the year, also called the ordinal date, is the position of a date counted from 1 January. 1 January is day 1, 1 February is day 32, and 31 December is day 365 in a common year or day 366 in a leap year.

How does a leap year affect the day number?

In a leap year, 29 February exists as day 60, which shifts every date from 1 March onward forward by one compared with a common year. For example, 1 March is day 60 in a common year but day 61 in a leap year. The calculator detects the leap year automatically.

What is the rule for leap years?

Under the Gregorian calendar a year is a leap year if it is divisible by 4, except years divisible by 100 are not leap years unless they are also divisible by 400. So 2000 was a leap year, 1900 was not, and 2024 is. This calculator applies that exact rule.

Where are ordinal dates used?

Ordinal dates appear in the ISO 8601 standard as the year followed by the day number, such as 2026-168. They are common in astronomy, aviation, computing, and logistics, where a single running day number is simpler to compare than a month-and-day pair.

How many days are left in the year?

Days remaining equals the total days in the year minus the current day number. The total is 365 in a common year and 366 in a leap year. If today is day 168 of a 365-day year, there are 197 days remaining, counting the current day as already elapsed.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.