Connect via MCP →

Enter Calculation

Formula

Formula: Julian–Gregorian Calendar Date Conversion Calculator
Show calculation steps (1)
  1. Julian date to Julian Day Number

    Julian date to Julian Day Number: Julian–Gregorian Calendar Date Conversion Calculator

    Same a, y, m substitutions but without the 100/400 century-leap corrections.

Advertisement

Results

Converted date
1,582 AD  ·  Month 6  ·  Day 5
in the target calendar
Era of result 1 (AD / CE)
Julian Day Number 2,299,039
Day difference (Gregorian minus Julian) +10 days

What this calculator does

This tool converts a calendar date between the Julian calendar (introduced 45 BC, every year divisible by 4 is a leap year) and the Gregorian calendar (the 1582 reform that drops three leap days every 400 years). Enter a date in one calendar and it returns the matching date in the other. It is a pure astronomical/Western calendar conversion and applies identically everywhere — it is not region-specific.

Diagram showing a Julian calendar date and a Gregorian calendar date linked through a central Julian Day Number
Both calendars convert through a shared Julian Day Number as a common reference point.

How to use it

Pick the source calendar (the system your entered date is written in); the result is produced in the opposite system. Choose the era (AD/CE or BC/BCE), then enter the year, month and day. The calculator reports the converted era, year, month and day, plus the intermediate Julian Day Number (JDN) and the day offset (how many days Gregorian leads Julian for that date).

The formula explained

The cleanest exact conversion routes through the JDN, an integer day count independent of any calendar. Step A converts the source (year, month, day) to a JDN using the standard integer formulas (a Julian variant and a Gregorian variant). Step B converts that JDN to the other calendar. The Gregorian-to-JDN formula is:

$$\text{JDN} = D + \left\lfloor\frac{153m+2}{5}\right\rfloor + 365y + \left\lfloor\frac{y}{4}\right\rfloor - \left\lfloor\frac{y}{100}\right\rfloor + \left\lfloor\frac{y}{400}\right\rfloor - 32045$$

and the Julian variant is:

$$\text{JDN} = D + \left\lfloor\frac{153m+2}{5}\right\rfloor + 365y + \left\lfloor\frac{y}{4}\right\rfloor - 32083$$

All divisions are mathematical floor divisions, and BC years use astronomical numbering: an astronomical year of 1 - B for a BC year B (1 BC = 0, 45 BC = -44), so round-tripping through year 0 is exact.

Flat number line showing the 10-day jump between Julian and Gregorian calendar dates in October 1582
In October 1582 the Gregorian reform skipped 10 days, illustrating the offset between the two calendars.

Worked example

Gregorian AD 1582-06-15. With Yastro = 1582, the Gregorian-to-JDN formula gives \(\text{JDN} = 2299039\). Converting that JDN to Julian yields 1582-06-05. So Gregorian 15 June 1582 equals Julian 5 June 1582 — the Gregorian calendar was 10 days ahead of the Julian then, matching the October 1582 reform (\(\text{dayDifference} = +10\)).

FAQ

Is there a year 0? No. In the era system 1 BC is followed directly by AD 1. Internally we use astronomical numbering where year 0 = 1 BC, which makes the math continuous.

Why "proleptic"? These conversions apply each calendar's rules to all dates, even before that calendar existed historically. They do not model the fact that different countries adopted the Gregorian reform at different times.

How large is the offset over time? Roughly 0 days near year 200, +10 days in 1582, +13 days for 1900–2099, and +14 days from 2100 onward.

Last updated: