CCalclabhub

Time & Dates

Julian day number

Converts a calendar date into a continuous day count, where a equals floor((14 minus month) divided by 12), y equals year plus 4800 minus a, and m equals month plus 12a minus 3.

The Formula

JDN = d + floor((153m + 2) / 5) + 365y + floor(y/4) - floor(y/100) + floor(y/400) - 32045

Converts a calendar date into a continuous day count, where a equals floor((14 minus month) divided by 12), y equals year plus 4800 minus a, and m equals month plus 12a minus 3.

SymbolMeaning
dDay of the month
mShifted month
yShifted year

What Each Symbol Means

dday

Day of the month

The day number within the month.

mmonth

Shifted month

Month plus twelve times a, minus three.

yyear

Shifted year

Year plus 4800 minus a.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to calculate days between dates page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Calculate Days Between Dates, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.