Tool to make calculation with dates. Date can be computed with additions or subtractions of days, weeks, months or years with a given date.
Calculation with Dates - dCode
Tag(s) : Date and Time
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Adding (or subtracting) days from a date involves determining a new date exactly N days before or after a reference date by traversing the calendar day by day.
This type of calculation is used to predict a deadline, estimate a delay, or measure a duration expressed in days.
Example: Calculate a countdown to an event (135 days before the next Olympic Games)
To add or remove days from a date, position the original date (day, month, year) in a reference calendar, then advance or rewind one day as many times as needed until the desired number of days is reached.
Date calculation tools like dCode use calendar algorithms that account for the actual length of months, leap years, and calendar transitions.
Example: Calculate the date of a 10,000-day birthday by adding 10,000 days to the birth date.
The calculation is based on the modern Gregorian calendar. For older dates (before 1582), some tools use the Julian calendar, noting that the transition from the Julian to the Gregorian calendar occurred at different times in different countries.
Approximations can only be used for estimating durations:
— 1 week = 7 days
— 1 month ≈ 30.44 days (average)
— 1 quarter ≈ 91.31 days (average)
— 1 year ≈ 365.2422 days (mean tropical year)
However, these values do not allow for the calculation of a precise date.
To calculate an age in days, subtract a reference date (usually today) from the date of birth.
dCode offers a tool for calculating the difference between two dates.
To add days in Excel, add an integer to a date.
Example: 2010/01/01 + 1 = 2010/01/02
To add months, use the function EDATE
Example: EDATE("01/01/2010",1) = 2010/02/01
dCode retains ownership of the "Calculation with Dates" source code. Any algorithm for the "Calculation with Dates" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Calculation with Dates" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Calculation with Dates" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Calculation with Dates" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Calculation with Dates on dCode.fr [online website], retrieved on 2025-12-23,