How it works
Calculate duration between dates or add/subtract days from a starting point.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
4-
?startDate=Start DateDate · Optional · Default: current date
-
?endDate=End DateDate · Optional · Default:
-
?daysToAdd=Days to Add (±)Number · Optional · Default: 0
-
?mode=ModeChoice · Optional · Default: diff
Outputs
1-
resultResultText · Primary output
result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.
Calculate time between dates or add/subtract days from a date
Description
The Date Calculator is a powerful scheduling tool with two primary functions. The Date Difference mode calculates the total number of days between any two points in time. The Add/Subtract Days mode allows you to project forward or backward from a specific date to find a deadline, anniversary, or goal date.
Inputs
- Mode: Choose between “Date Difference” or “Add/Subtract Days.”
- Start Date: The beginning date for your calculation.
- End Date (Difference mode): The target date to compare against.
- Days to Add (Add mode): Use positive numbers to look forward or negative numbers to look backward into the past.
Outputs
- Result: Either the total count of days or the specific date reached.
Chart
- N/A: This tool provides direct calendar results.
“Good to Know”
- Inclusive vs. Exclusive: This tool calculates the absolute difference. For example, the difference between January 1st and January 2nd is “1 day.”
- Leap Years: The tool automatically accounts for leap years and the varying number of days in each month.
- Negative Days: In “Add/Subtract” mode, entering
-30will tell you exactly what the date was 30 days ago.
Examples
Example 1: Anniversary Countdown
- Input: Mode: Diff, Start: Today, End: Next Year’s Anniversary
- Output: 365 days (or 366 in a leap year)
Example 2: Project Deadline
- Input: Mode: Add, Start: Oct 1, Days to Add: 45
- Output: Nov 15
Example 3: Past History
- Input: Mode: Add, Start: Jan 1, Days to Add: -100
- Output: Sep 23 (of the previous year)