Date Calculator
Difference between dates and date arithmetic
Examples
Compute days between two dates
from: 2024-01-15
to: 2024-03-2065 days = 9 weeks 2 days = 2 months 5 daysDay count is exact; week and month counts use calendar-aware subtraction so '2 months' lines up with the 15th of March, not a fixed 60-day window.
Add 90 business days to a date
start: 2024-06-01
add: 90 business days (skip Sat/Sun)2024-10-08Skips weekends so the result lands on a weekday, useful for projecting delivery or SLA deadlines.
About this tool
The Date Calculator does two complementary things: computes the difference between two dates in days, weeks, months and years, and adds or subtracts a duration to a starting date. Both operations are calendar-aware, so day counts are exact and month/year arithmetic lands on a real calendar date (Jan 31 + 1 month = Feb 28, not Mar 3).
It respects your local timezone and DST rules, and can switch to UTC for stable, timezone-independent intervals. All math runs in your browser; your dates are not uploaded or stored.
How to use this tool
Pick a mode
Choose Difference to find the interval between two dates, or Add/Subtract to project a date forward or backward by a chosen duration.
Enter the dates or duration
For Difference, set the start and end dates. For Add/Subtract, set a start date and a duration in days, weeks, months or years.
Read the result
The tool shows the interval in calendar units or the projected date. Switch the timezone to UTC for a stable, region-independent result.
Use cases
Calculating SLA and trial windows
Compute 'N days from now' or 'days until expiry' for support tickets, free trials, and license terms without doing calendar math by hand.
Projecting timelines
Add a fixed number of weeks or months to a project start date and see the resulting calendar date, accounting for short months and leap years.
Verifying a colleague's date arithmetic
Sanity-check a date diff you computed inline in a spreadsheet before quoting it in a contract or report.
Common mistakes
Mistake:Treating a 'month' as 30 days.
Fix:Calendar months vary from 28 to 31 days. The calculator uses calendar-aware subtraction so Jan 31 + 1 month = Feb 28/29, not Mar 3.
Mistake:Ignoring the user's timezone.
Fix:Two dates with the same calendar date in different timezones can be 24 hours apart in absolute time. Switch to UTC if you need a stable, tz-independent result.
Mistake:Forgetting DST transitions.
Fix:Spring-forward and fall-back days have 23 or 25 hours. The calculator respects local DST, so '24 hours from now' is always exactly 24 hours even across a transition.
Frequently asked questions
How is the difference between two dates calculated?
The tool computes the signed interval in calendar units (days, weeks, months, years) using the Gregorian calendar. Day and week counts are exact; month and year counts use calendar-aware subtraction so 2024-03-31 minus 1 month correctly gives 2024-02-29 instead of a phantom Feb 31.
Does it handle timezones and DST correctly?
Yes. Calculations are performed against the user's local timezone, so daylight-saving transitions and UTC offsets are respected. Switch to UTC if you need a stable, timezone-independent interval.
How does add/subtract interpret negative or fractional values?
Negative values subtract, positive values add, and fractional values are accepted for day-based units (e.g. add 1.5 days = 36 hours). For month and year units, fractional values are rounded to the nearest whole unit.
Is anything sent to a server?
No. All date arithmetic runs in your browser; the dates you enter are not uploaded or stored.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML