Skip to content

📅 Date Calculator

Compute the difference between two dates, add or subtract days/weeks/months/years, count workdays excluding weekends and holidays, and calculate age. Auto-detects YYYY-MM-DD, YYYY/MM/DD, and Japanese date formats with timezone support.

100% Free No signup Browser-only 5 languages Dark mode

🔒 About Privacy

💡 Accepts YYYY-MM-DD, YYYY/MM/DD, and Japanese date formats

📖 Where people get stuck

Computes the difference between two dates, adds and subtracts from a date, counts business days (excluding weekends and any holidays you supply) and works out an age. It auto-detects YYYY-MM-DD, YYYY/MM/DD and Japanese-style dates, and lets you pick a time zone. Everything runs in the browser. Date arithmetic has no single correct answer — how many days a period contains, and what adding a month across a boundary means, are matters of convention, quite separate from how any implementation happens to behave.

Case What happens What to do
The number of days is off by one Is 1 April to 3 April two days or three? Subtraction gives two, but the everyday phrase three days is the result of counting the first, second and third. The difference is whether the first day is included, and the answer varies by industry and by context: nights of accommodation are a subtraction, days worked include both ends, and a contract term is whatever the contract defines. Japanese civil law takes the first day as excluded, counting from the following day, but in practice contracts more often specify a different rule, so knowing the legal default does not settle it. State in the specification or the contract whether the first day counts. This is not something for the implementation to decide but an agreement to reach beforehand. On the implementation side, encoding the intent in the variable name is the most effective move: writing nights or inclusive_days rather than days leaves no room for a reader to misread it. Always include the same-day case in your tests — whether 1 April to 1 April is zero days or one pins the specification down in a single assertion. An off-by-one boundary still runs, so without that test you find out in production.
Adding a month does not do what you expect What is one month after 31 January? There is no 31 February, so implementations produce 28 February (clamped to the end of the month), 3 March (adding 31 days and rolling over) or 1 March. None of those is wrong; they are different conventions. Worse, the operation is not reversible: one month forward then one month back need not return you to the original date — 31 January to 28 February to 28 January. Pick the 31st as a subscription billing day and you meet this every month. Decide how month-ends are handled before you add months. The common choice is clamping a nonexistent day to the end of the month, which is closest to intuition and is the default in most libraries. Where the date carries meaning, as with billing or contract renewal, the safest design is simply not to allow the 29th onwards to be chosen — that is why so many subscription services work that way. If you need month-end billing, implement it as a separate concept: define it as the last day of the following month rather than 31 January plus one month, and the ambiguity disappears.
Business-day counts drift by country and by year Public holidays change every year. In Japan, several fall on the nth Monday and therefore move each year, while the equinox holidays are determined by astronomical calculation and only fixed in the previous year official gazette. On top of that, a holiday landing on a Sunday creates a substitute holiday, and a weekday sandwiched between two holidays becomes one as well. Across countries the picture changes entirely: the same five business days ends on different dates in Japan, the United States, China and the Islamic world — the Chinese New Year period and the Friday weekend in the Middle East depart sharply from Japanese assumptions. This tool takes the holiday list from you, so a stale list gives a stale answer. Japanese public holidays are published as a CSV by the Cabinet Office; refresh from it every year — reusing last year list is the most common mistake in this kind of calculation. Where several countries are involved in a delivery calculation, compute each country with its own list: the phrase business day is the same but the days it denotes are not. And whenever the result becomes a deadline or a payment date, confirm the actual date with the other party — agreeing on a specific date rather than five business days from now removes the counting question entirely.

Even when you believe you are only handling dates, time zones intrude. Whether 2024-01-01 is read as UTC or as Japan time decides whether the same instant is 1 January or 31 December — 8am on 1 January in Japan is still 11pm on 31 December in UTC. With a UTC server and users in Japan, todays totals switch over at 9am local time. When storing a date in a database, use a DATE type with no time component, or standardise on UTC. Second: a birthday or an anniversary is not an instant but a date on the local calendar — someone born on 3 May 1990 has a birthday on 3 May wherever they are, and crossing the date line on a flight does not change that. Attach a time zone to such a value and it shifts by a day when accessed from abroad. Remember that there are cases where carrying no time at all is the correct model.

📖 How to Use

  1. 1
    Choose a mode
    Pick Difference, Add/Subtract, Workdays or Age from the top tabs.
  2. 2
    Enter dates
    Use YYYY-MM-DD, YYYY/MM/DD, or Japanese-style format.
  3. 3
    Calculate
    Click Calculate to see the result below.

❓ Frequently Asked Questions

Are my dates sent to your server?
No. All calculations run entirely in your browser via the JavaScript Date API. Your dates and holiday lists never leave your device.
How are leap years and month-ends handled?
Leap years follow the standard rule (div by 4, not 100, or div by 400). When adding months, dates beyond month-end are clamped (e.g. Jan 31 + 1 month = Feb 28).
How do I enter the holiday list?
One date per line, ideally in YYYY-MM-DD format. Blank lines are ignored. Weekends are excluded automatically.

🔗 Related Tools

🐛 Found a bug or issue with this tool?

Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.

* Browser info (UA / screen / language / URL) is sent automatically to help reproduce the issue