Day of Year Converter

Convert a date to its day number in the year and back again, with the leap-year effect on every date after February made explicit.

Day of year for the date 293
day of year = (date − 1 January of that year) ÷ 1 day + 1
Date for that day number Sunday 19 July 2026
Days left in that year 72
Days in the year 365
Through the year 80.3 %
Leap year 2026 is not a leap year, so day numbers after February match a common year.

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Day of Year Converter does

Use this day of year converter to convert a date to its day number in the year and back again, with the leap-year effect on every date after February made explicit. Fill in all 3 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for reading an ordinal date from a log file, a data set or a packaging stamp. We run a second free tools site as well — FreeToolStation.org.

How to use it

  1. Pick a date to get its day number — 1 January is day 1.
  2. Or enter a day number and a year to convert back the other way.
  3. Check the leap-year note if the date falls after February.

How it works

The day of year, or ordinal date, numbers the days from 1 on 1 January to 365 or 366 on 31 December. It is the format ISO 8601 writes as 2026-200, and it turns up far more often than most people notice: in scientific data logging, in mainframe and banking systems, in astronomy, in flight and manufacturing records, and stamped on film and food packaging where three digits are cheaper to print than a full date.

Leap years are the whole complication and they bite in exactly one place. Up to 28 February the day number is identical in every year. From 1 March onwards a leap year runs one day number higher than a common year — 1 March is day 60 in a common year and day 61 in a leap year — which means day numbers are only comparable between years if you check first. Comparing day 200 of 2024 with day 200 of 2026 compares 18 July with 19 July, not the same date.

The leap rule itself is three conditions, not one: divisible by four, except centuries, except centuries divisible by four hundred. 1900 was not a leap year and 2000 was, which is why a surprising amount of software written before 2000 has a bug on 29 February 2000 or 2100. The calculation here applies all three, so it is correct for any year rather than for the next seventy-odd.

When to use it

  • Reading an ordinal date from a log file, a data set or a packaging stamp.
  • Converting a day number back to a readable date.
  • Seeing how far through the year a date falls.
  • Checking whether two day numbers in different years mean the same date.

Common mistakes to avoid

  • Comparing day numbers across years without checking for a leap year. After February they are offset by one.
  • Starting the count at zero. 1 January is day 1, not day 0.
  • Confusing the day of year with the Julian Day Number, which counts from 4713 BC and is a different thing entirely.
  • Assuming every year divisible by four is a leap year. Centuries are not, unless divisible by 400.

Frequently asked questions

Is day of year the same as a Julian date?

No, though the terms get mixed up. This numbers days within one year, 1 to 366. The Julian Day Number counts days continuously from 4713 BC and is used in astronomy.

Does 1 January count as day 1 or day 0?

Day 1. The ordinal date in ISO 8601 is one-based.

Why do day numbers differ between years?

A leap year inserts 29 February, so every date from 1 March onwards is one number higher than in a common year.

What is the leap year rule exactly?

Divisible by 4, except years divisible by 100, except those also divisible by 400. So 1900 was not a leap year and 2000 was.

Related tools

See all date & time tools →