Have you ever wondered what day number it is? Is today day 180, day 243, or somewhere else on the calendar? The day of year — also called the ordinal date — counts how many days have passed since January 1 of the current year, with January 1 counted as day 1. This day of year calculator converts any calendar date into that running number, tells you how many days are left in the year, names the weekday, and shows what percentage of the year has already slipped by.
Project managers, teachers, accountants, bloggers, and even fitness trackers use the ordinal date all the time. Manufacturers print Julian-style date codes on food packaging; software logs timestamp events as day-of-year numbers; and people making New Year's resolutions want to know exactly how much of the year is left to hit their goals. Enter any date below and the number updates instantly.
How to Use
- Type the four-digit Year you care about. The calculator supports years 1 through 9999, which covers every practical date on the Gregorian calendar.
- Enter the Month as a number from 1 (January) to 12 (December).
- Enter the Day of that month. The engine knows the real length of every month, including February 29 in leap years, so you cannot accidentally ask for February 30.
- Read the result card:
- Day of the Year — the ordinal number of your date, from 1 to 366.
- Total Days in Year — 365 for a common year, 366 for a leap year.
- Days Remaining in Year — how many days come after your date, not counting your date itself.
- Weekday — the full English weekday name of the date.
- Year Completed — day of year divided by total days, as a percentage.
The math is simple: day-of-year equals the number of whole days between January 1 and your date, plus one. That "+1" is the whole trick — without it, January 1 would be day 0, and nobody plans their year from zero.
The Formula, Step by Step
Given a date (year, month, day), the engine builds two real calendar dates:
- January 1 of that year — call it
jan1 = date(year, 1, 1). - Your date —
target = date(year, month, day).
Then:
dayOfYear = (target − jan1).days + 1
Because the Gregorian calendar rules are built into the date library, leap years are handled automatically. A leap year happens when the year is divisible by 4, except century years that are not divisible by 400 — so 2000 was a leap year, 1900 was not, and 2024 is.
Total days in the year come from the gap between next January 1 and this January 1:
daysInYear = (date(year + 1, 1, 1) − jan1).days
which is 365 in a common year and 366 in a leap year. Finally:
daysRemaining = daysInYear − dayOfYear
December 31 always returns 0, because no days follow it inside that year. The percentage of the year completed is dayOfYear ÷ daysInYear × 100, rounded to two decimals.
Examples
Example 1 — January 1, 2023. A normal non-leap year. The difference between the date and itself is 0 days, plus 1 = day 1 of 365. Days remaining = 365 − 1 = 364. The weekday is Sunday, and only 0.27% of the year has completed.
Example 2 — June 15, 2024. 2024 is a leap year, so it has 366 days. Counting days from January 1: 31 (Jan) + 29 (Feb) + 31 (Mar) + 30 (Apr) + 31 (May) = 152 days through May 31, plus 15 days into June = day 167 of 366. Days remaining = 366 − 167 = 199. The weekday is Saturday, and the year is 45.63% finished.
Example 3 — December 31, 2024. The last day of a leap year. It is day 366 of 366, with 0 days remaining, falling on a Tuesday, and the year reads 100.00% complete.
Example 4 — February 29, 2024. The leap-day boundary itself lands on day 60 of the year, a Thursday. In a common year, February 28 is day 59 and March 1 jumps to day 60; in a leap year, February 29 fills that gap so March 1 becomes day 61. This is exactly why the calculator computes the difference in real dates instead of using a fixed month-length table.
Common Uses of the Ordinal Date
- Work and project tracking — production lines, shipping schedules, and farm reports often phrase milestones as "day 120 of the year" instead of calendar dates. Converting back and forth takes one second here.
- Fitness and habit streaks — if you want to know whether you have already passed the halfway mark of the year, day 184 is the turning point on a 365-day calendar and day 184.5 on a leap-year calendar.
- Budgeting — spreading an annual salary or an annual budget across 365 days means each day represents roughly 0.274% of the year. Knowing your day number tells you how much of the budget "should" have been spent by now.
- Date codes on packaging — many manufacturers stamp a three-digit Julian code (for example 180 = the 180th day) on cans, bottles, and boxes. Type that code plus the year into the reverse direction and you can decode the production date.
FAQ
What day number is today?
Use today's date — the calculator pre-fills the current year, month, and day — and read the highlighted Day of the Year result. On January 1 it is 1; on December 31 of a common year it is 365; on December 31 of a leap year it is 366.
Is January 1 day 0 or day 1?
It is day 1. Every calendar counting system used in business, science, and government treats January 1 as the first day of the year. The formula (date − Jan 1).days + 1 adds that one on purpose; dropping it would silently shift every result by a day.
How many days are left in the year?
The calculator subtracts your day-of-year from the total days in that year (365 or 366). On January 1 of a common year you have 364 days left; on December 31 you have 0 days left. If today is June 15 of a leap year, 199 days remain.
Does the calculator account for leap years?
Yes. It uses real calendar-date arithmetic, so February 29 exists in 2024, 2028, and 2032, and March 1 correctly lands on day 61 in leap years versus day 60 in common years. Century years such as 1900 and 2100 are treated as non-leap, while 2000 and 2400 are leap, matching the Gregorian rule.
What is the difference between day of year and a Julian date?
They are close but not identical. The day of year (ordinal date) is just the 1–366 day number within one year. The Julian date used by astronomers is a continuous count of days since 4713 BC, which never resets on January 1. This tool computes the within-year ordinal number, not the astronomical Julian day.
Can I use this for dates far in the past or future?
The engine accepts Gregorian calendar years from 1 through 9999. Dates before the introduction of the Gregorian calendar (1582 onward, depending on the country) are treated as proleptic Gregorian — the calendar extended backward as if it had always existed — which is the standard convention in computing.
Disclaimer
This day of year calculator is provided for informational purposes only. It is not intended for legal, astronomical, or official record-keeping use. Results are computed with standard Gregorian calendar arithmetic; historical dates may differ slightly depending on when a country adopted the Gregorian calendar. Always verify critical dates against an authoritative calendar or official source.