Days between two dates
Date N days before / after
How to use the date calculator, and how periods are counted
"What date is 90 days after the contract date?" and "how many days since I started?" are easy to get wrong by hand, because month lengths and leap years get in the way. This tool does both: the interval between two dates, and a date N days before or after a starting point.
How to use it
Pick a start and end date in the upper section to get days, weeks and an approximate month count. The lower section adds or subtracts days from a reference date. Entering a negative number counts backwards, so one field covers both directions.
Counting the first day, or not, shifts everything by one
Periods can be counted inclusively (first day included) or exclusively (first day excluded). Article 140 of the Japanese Civil Code sets the default: when a period is stated in days, the first day is not counted unless the period starts at midnight. So "within 30 days of the contract date" normally starts counting from the following day.
When the last day falls on a holiday
Article 142 provides that if the final day falls on a Sunday, a public holiday or another day on which business is customarily not done, the period ends on the following day. That is why filing and payment deadlines that land on a weekend are usually treated as due the next business day — unless a specific contract says otherwise.
Leap years
Years divisible by 4 are leap years, except that years divisible by 100 are not, unless they are also divisible by 400. 1900 was a common year; 2000 was a leap year. This tool applies the full rule, so long intervals stay accurate.
Where this is useful
Contract and warranty deadlines, return dates, notice periods, counting down to an event, or tracking a habit. If you want the result as an age, use the age calculator; for pregnancy weeks, the due date calculator.
Frequently asked questions
How are the days counted?+
By default it is end minus start; ticking "include the first day" counts one more (both ends inclusive).
How is the date N days later calculated?+
Month, year and leap-year boundaries are handled automatically.
Does it handle leap years?+
How is the weekday determined?+
Are the dates I enter stored?+
・Difference = (end − start) in days (+1 if the first day is included)
・N days before/after = base date ± days. Times and time zones are ignored; calculations use calendar days.
・Calendar: Gregorian (ISO 8601). Leap years are divisible by 4, except centuries not divisible by 400.
・Civil Code of Japan, Art. 140: when a period is stated in days, weeks, months or years, the first day is not counted
・Civil Code of Japan, Art. 142: if the last day falls on a holiday on which business is customarily not done, the period expires the following day
・Act on National Holidays (Japan): the basis for identifying the holidays referred to in Art. 142
This site does not represent any organization and does not guarantee the accuracy of the results. Legal or contractual "counting from" rules (whether the first day is included) vary by agreement and jurisdiction. Confirm important dates with the source or the parties involved.