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
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.
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).
Use timetuple().tm_yday on any datetime or date object: