User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Category Time & Date
Choose any date to calculate its position in the year
โ€” day of the year
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Converting a calendar date to its ordinal day number - N ranging from 1 (January 1) to 365 or 366 - is fundamental for agricultural planning, financial day-count conventions (ACT/365), and satellite scheduling systems that use ordinal dates instead of month-day formats. Miscounting the day number by even one unit cascades into incorrect interest accruals, missed planting windows, or misaligned data logs. This calculator computes N using the formula N = floor((D โˆ’ D0) รท 86400000) + 1, where D is the target date's Unix timestamp and D0 is January 1 of the same year. It also returns ISO 8601 week number, quarter, days remaining, and a visual progress indicator.

Leap year handling follows the Gregorian rule: years divisible by 4 are leap years, except century years must also be divisible by 400. February 29 exists only in leap years, making day 60 either February 29 or March 1 depending on the year. The tool validates input ranges and prevents impossible dates like February 30 from producing erroneous output.

day of year date calculator julian day ordinal date calendar tools week number year progress

Formulas

The ordinal day number N represents the count of days elapsed since January 1 of the given year, inclusive.

N = floor(D โˆ’ D086400000) + 1

Where D = Unix timestamp of target date at midnight UTC, D0 = Unix timestamp of January 1 of the same year at midnight UTC, and 86400000 = milliseconds per day.

Leap year determination follows the Gregorian calendar rule:

{
TRUE if Y mod 400 = 0FALSE if Y mod 100 = 0TRUE if Y mod 4 = 0FALSE otherwise

ISO 8601 week number uses Thursday as the anchor. Week 1 contains the first Thursday of the year:

W = floor(N + 10 โˆ’ weekday7)

Where weekday = day of week (1 for Monday through 7 for Sunday).

Reference Data

MonthDaysFirst Day (Regular)Last Day (Regular)First Day (Leap)Last Day (Leap)
January31131131
February28/2932593260
March3160906191
April309112092121
May31121151122152
June30152181153182
July31182212183213
August31213243214244
September30244273245274
October31274304275305
November30305334306335
December31335365336366

Frequently Asked Questions

In leap years, February 29 is day 60, shifting all subsequent days by 1 compared to regular years. March 1 becomes day 61 in leap years versus day 60 in regular years. The calculator automatically detects leap years using the Gregorian rule: divisible by 4, except century years must be divisible by 400.
ISO 8601 defines week 1 as the week containing the first Thursday of the year. This means January 1 through 3 may belong to week 52 or 53 of the previous year. Some regions use Sunday-start weeks or define week 1 as the week containing January 1 regardless of weekday. Financial and logistics systems often mandate ISO 8601 compliance.
Yes. In leap years, December 31 is day 366. The calculator displays total days in the year alongside the current day number, making leap year context explicit. Ordinal dates in ISO format appear as YYYY-DDD, such as 2024-366 for December 31, 2024.
Day-count conventions like ACT/365 and ACT/ACT calculate interest accrual based on actual calendar days. The ordinal day number determines exact day counts between dates. Errors propagate into incorrect interest payments. Bond markets, loan servicing, and treasury operations rely on precise ordinal date arithmetic.
This calculator uses proleptic Gregorian calendar rules, projecting current leap year logic backward. Historical dates before October 15, 1582, would have used the Julian calendar with different leap year rules. For pre-1582 dates, results represent hypothetical Gregorian equivalents, not actual historical day counts.