Convert any Gregorian date to its Day of Year (DOY) number, also known as ordinal date. Instantly see remaining days, leap year status, weekday, and annual progress percentage.
The Day of Year (DOY), also known as ordinal date or Julian day number (simplified), represents the count of days from January 1st (DOY = 1) up to a given date. For example, February 1st is DOY 32 in a common year, and December 31st is DOY 365 (or 366 in leap years). Astronomers, logisticians, and software engineers rely on ordinal dates for data indexing, satellite passes, and year-over-year comparisons.
? Formula for DOY (non-leap): DOY = day + cumulative days of previous months.
Leap year adds 1 for dates after February 29.
Leap year rule (Gregorian): A year is leap if divisible by 4, except centuries not divisible by 400. Example: 2000 leap, 1900 not leap.
Our calculator uses the proleptic Gregorian calendar rules, validated against ISO 8601. Steps:
Our implementation is verified against NIST time references and authoritative astronomical almanacs. The JavaScript engine performs double‑precision arithmetic, ensuring millisecond accuracy.
Satellites like Sentinel-2 provide NDVI indices indexed by DOY. Agronomists compare DOY 120 (April 30) across multiple years to assess vegetation greenness trends. Using our calculator, researchers can quickly convert planting dates to DOY for time-series analysis and detect phenological shifts due to climate change. It eliminates month‑name confusion and standardizes global timelines.
The concept of leap year originates from the Julian calendar introduced by Julius Caesar (45 BCE). However, the Julian rule overcorrected, leading to the Gregorian reform in 1582 by Pope Gregory XIII. Today, the Gregorian calendar is internationally accepted for civil use. Without leap days, seasons would shift by about 24 days every century. Our calculator respects the full Gregorian leap rule, ensuring correct DOY for any valid year.
Do not confuse Day of Year (1‑366) with Julian Day Number (continuous count of days since公元前4713年). JDN is used in astronomy for epoch calculations, while DOY resets each year. This tool focuses on DOY, the most practical for annual cycles. For full JDN conversion, see our dedicated Julian Date Converter.
| Scenario | Date | DOY (common year) | DOY (leap year) | Weekday (example) |
|---|---|---|---|---|
| New Year's Day | Jan 1 | 1 | 1 | Depends on year |
| Valentine's Day | Feb 14 | 45 | 45 | — |
| Leap Day | Feb 29 | N/A | 60 | — |
| Independence Day (US) | Jul 4 | 185 | 186 | — |
| Christmas | Dec 25 | 359 | 360 | — |