Day of the Year & Year-to-Date Calculator

Find the day number of any date, track year progress, or calculate how many years ago a year was. Automatically adjusts for leap years (366 days).

Today is Saturday, July 4, 2026

185
Day of the year
180
Days remaining in 2026
50.7%
Of 2026 elapsed
365
Total days in 2026
Year 2026 progress

What is the day number of the year?

Each day from January 1st is assigned an ordinal number, starting at 1. January 1st is day 1, February 1st is day 32, and December 31st is day 365 (or 366 in a leap year). This is also called the Julian day number or ordinal date.

What does year-to-date mean?

Year-to-date (YTD) refers to the period from the first day of the current calendar year up to today. It is commonly used in finance and business reporting to measure performance over the elapsed portion of the year. For example, if today is day 100, then 100 days have elapsed year-to-date and 265 remain (in a non-leap year).

How to calculate the day of the year in Python

Use timetuple().tm_yday on any datetime or date object:

from datetime import date today = date.today() day_of_year = today.timetuple().tm_yday days_in_year = 366 if (today.year % 4 == 0 and today.year % 100 != 0) or today.year % 400 == 0 else 365 days_remaining = days_in_year - day_of_year print(f"Day {day_of_year} of {days_in_year} ({days_remaining} remaining)")