Date Diff Calculator(日付差分計算)
2つの日付・時刻の差分を日数/時間/分、および年月日表記で計算します。今日からの日数計算モード付き。
時刻は任意(未入力は00:00)
時刻は任意(未入力は00:00)
日付を入力すると結果が表示されます。
How to Use the Date Diff Calculator
This free online date difference calculator computes the time between two dates (with optional times) instantly in your browser. Choose "期間の差分" to compare two arbitrary dates, or "今日からの日数" to compare a single date against the current moment — handy for counting down to a deadline or checking how many days have passed since an event. Results are shown both as a calendar-style breakdown (years, months, days) and as simple totals (total days, hours, minutes).
Calendar Breakdown vs. Total Days
The year/month/day figure walks the calendar the same way a person counting on their fingers would: it accounts for the actual number of days in each month (28 to 31) and leap years, so "1ヶ月" can represent anywhere from 28 to 31 days depending on which months are spanned. The total days/hours/minutes figures are a straightforward millisecond-based calculation and will not exactly match "months × 30". Both numbers are useful for different purposes: the calendar breakdown reads naturally ("2年3ヶ月"), while the totals are precise for scheduling and billing calculations.
今日からの日数モード
Enable "今日からの日数" to skip entering a start date entirely — the tool compares your target date against the exact current moment. This is useful for anniversary countdowns, project deadline tracking, or checking elapsed time since a past event without manually looking up today's date.
日付差分計算ツールの使い方
「期間の差分」タブで開始日・終了日(時刻は任意)を入力すると、年月日形式(◯年◯ヶ月◯日)と、 合計日数・合計時間・合計分が同時に表示されます。「今日からの日数」タブでは対象日を1つ入力するだけで、 現在時刻との差分を「◯日後」「◯日前」の形式で確認できます。全ての計算はブラウザ内で完結します。
よくある落とし穴と対処 / Common Pitfalls
| 落とし穴 / Pitfall | 問題 / Problem | 対処 / Fix |
|---|---|---|
| 「1ヶ月」の日数が固定だと思い込む Assuming 1 month = fixed number of days | 月によって28〜31日と幅があり、暦計算と日数換算が一致しない Month length varies 28-31 days, so calendar and total-day figures diverge | 正確な期間管理には「合計日数」を、直感的な表示には「年月日」を使い分ける Use total days for precise scheduling, the Y/M/D figure for readability |
| タイムゾーンをまたぐ日時比較 Comparing dates across timezones | 入力欄はブラウザのローカルタイムゾーンで解釈される Date/time inputs are interpreted in the browser's local timezone | 海外の日時を比較する場合はローカル時刻に換算してから入力する Convert to local time before entering, if the other date is from another timezone |
| うるう年の2/29をまたぐ計算 Calculations spanning a leap day (Feb 29) | 年数だけで概算すると1日のズレが生じることがある Estimating by year count alone can be off by a day | 本ツールはDateオブジェクトで月末日を都度判定するため自動対応 This tool checks the actual days-in-month via the Date object automatically |
| 開始日が終了日より後 Start date is later than end date | 入力を逆にすると差分の符号が反転する Reversed inputs flip the sign of the difference | 結果欄に「開始日が終了日より後」と表示された場合は日付を入れ替える Swap the two dates when the warning is shown |
| 時刻を入れたつもりが00:00扱いになる Time silently defaults to 00:00 | 時刻欄が未入力のまま計算すると00:00として扱われる An empty time field is treated as midnight | 時間単位の精度が必要な場合は両方の時刻欄を明示的に入力する Fill in both time fields explicitly when hour-level precision matters |
計算例 / Examples
2024-01-01 → 2026-07-12
→ 2年6ヶ月11日 / 合計923日
2028-02-01 → 2028-03-01 (うるう年)
→ 0年1ヶ月0日 / 合計29日 (2月は29日まで)
2026-02-01 → 2027-03-01 (平年をまたぐ)
→ 1年1ヶ月0日 / 合計393日Why browser-only?
The dates you compare here — contract deadlines, medical appointments, anniversaries — can reveal personal or business context you would not want logged on a server. This calculator uses only the browser's built-in Date object: nothing is uploaded, nothing is stored, and it keeps working offline once the page has loaded. Verify it yourself in the DevTools Network tab.
日付の組み合わせから契約期限や通院予定などの個人情報が推測できることがあります。 本ツールは計算の全てがブラウザ内で完結し、入力した日付が外部に送信されることはありません。
関連ツール / Related Tools
開発をもっと効率的に
PR