vootkit
GuideEveryday

How to Add, Subtract and Compare Calendar Dates

Finds the number of days between two dates, and adds or subtracts a period from a date to give the resulting one.

Editorial illustration representing the Date Calculator workflow.
On this page10 sections

Date arithmetic looks trivial and is not. Months have different lengths, years occasionally have an extra day, and the rules for what counts as a working day change the moment you cross a border.

What the Date Calculator does

Finds the number of days between two dates, and adds or subtracts a period from a date to give the resulting one.

It counts calendar days rather than working days, which is the right basis for contracts and notice periods and the wrong one for project schedules.

Open the Date Calculator and follow the settings and checks below.

Rules being applied

Setting What it means
Leap years Divisible by 4, except centuries, unless divisible by 400 — 2000 was, 1900 was not
Days counted Calendar days, including weekends and holidays
Inclusive or exclusive The difference excludes the start date and includes the end
Month arithmetic 31 January plus one month clamps to the end of February
Time zones Not applied — dates are treated as plain calendar dates
Range Any dates the browser can represent, well beyond any practical need

How to use it

  1. Pick your two dates, or a start date and a period to add.
  2. Decide whether your deadline counts the start day. "Within 30 days" usually does not.
  3. Read the result in days, then convert to weeks or months if that reads better.
  4. For anything contractual, check whether the agreement means calendar or business days.

Practical advice

The inclusive-versus-exclusive question causes more real disputes than leap years ever will. "Within 14 days of receipt" almost always means the day after receipt is day one, so an item received on the 1st is due on the 15th — but "14 days including today" makes it the 14th. On a notice period, a rent deadline or a returns window, that single day is the difference between being on time and being late, and it is worth reading the exact wording rather than assuming.

Common questions

Does the count include both the start and end dates?

The difference excludes the start date and includes the end one, which is the standard convention — from the 1st to the 8th is seven days. If your contract counts differently, and some do, add or subtract one accordingly. The wording to look for is "clear days", which usually means excluding both ends.

How are leap years handled?

Correctly, including the century rule that catches most manual calculations: a year divisible by 4 is a leap year unless it is divisible by 100, unless it is also divisible by 400. So 2000 had a 29 February and 1900 did not — a distinction that broke a great deal of software written in the 1990s.

What happens when I add a month to 31 January?

It clamps to the last day of February, so 28 or 29 depending on the year, because 31 February does not exist. This is the standard behaviour and it is worth knowing that it is not reversible: adding a month and subtracting one again does not always return you to the date you started from.

Can it count only working days?

No — it counts calendar days, which is what contracts, notice periods and statutory deadlines almost always mean. Working-day counts depend on which public holidays apply where you are, and a tool that guessed at that would be confidently wrong for most of the people using it.

Useful next tools

Vootkit provides a browser calculator and educational guidance. Results depend on the values and units you enter, so verify important financial, academic, safety or professional decisions with an appropriate authoritative source.

Vootkit tools

Try the tools from this guide

About the author

The Vootkit team

Practical guides from the people building Vootkit's browser-based PDF, image, video and productivity tools.

Stay updated

Work smarter with Vootkit

Get practical guides, new tools and useful workflows in your inbox.