{"id":70002,"date":"2026-11-09T07:26:49","date_gmt":"2026-11-09T01:56:49","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/tools\/date-calculator\/"},"modified":"2026-11-09T07:26:49","modified_gmt":"2026-11-09T01:56:49","slug":"date-calculator","status":"publish","type":"page","link":"https:\/\/www.quickonlinetips.com\/archives\/tools\/date-calculator\/","title":{"rendered":"Date Calculator: Add or Subtract Days From a Date"},"content":{"rendered":"<p>This free <strong>date calculator<\/strong> adds or subtracts days, weeks, months and years from any date, and counts the days between two dates. It can count business days only (Monday to Friday), shows the day of the week, week number and day of the year, and works out the answer as you type.<\/p>\n<style>.qdc-res{background:#fff;border:1px solid #C9D8EA;border-radius:12px;padding:16px;margin:14px 0 0;text-align:center} .qdc-big{font-size:clamp(24px,5.5vw,36px);font-weight:800;color:#215387;line-height:1.2} .qdc-sm{font-size:15px;color:#4A5568;margin:6px 0 0} .qdc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0 0} .qdc-grid div{background:#F7FAFC;border:1px solid #E2E8F0;border-radius:10px;padding:10px 6px;text-align:center} .qdc-grid b{display:block;font-size:22px;color:#215387;font-variant-numeric:tabular-nums;word-break:break-word} .qdc-grid span{font-size:13px;color:#4A5568} .qdc-sign{display:flex;gap:8px} .qt-tool .qdc-sign button{flex:1 1 0} @media (max-width:600px){.qdc-grid{grid-template-columns:1fr 1fr}}<\/style>\n<div class=\"qt-tool\" id=\"qdc\"><p class=\"qt-label\" style=\"font-size:1.05em;margin:0 0 8px\">Choose one option:<\/p><div class=\"qt-tabs\" role=\"tablist\" id=\"qdc-tabs\"><button type=\"button\" role=\"tab\" aria-selected=\"true\" data-t=\"add\">Option 1: Add or subtract days<\/button><button type=\"button\" role=\"tab\" aria-selected=\"false\" data-t=\"diff\">Option 2: Days between two dates<\/button><\/div><div id=\"qdc-p-add\"><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Pick a start date<\/p><div class=\"qt-grid\"><div class=\"qt-field\"><label for=\"qdc-start\">Start date<\/label><input type=\"date\" id=\"qdc-start\"><\/div><div class=\"qt-field\"><label>Add or subtract<\/label><div class=\"qt-seg qdc-sign\" id=\"qdc-sign\" role=\"group\" aria-label=\"Add or subtract\"><button type=\"button\" data-v=\"1\" aria-pressed=\"true\">+ Add<\/button><button type=\"button\" data-v=\"-1\" aria-pressed=\"false\">&minus; Subtract<\/button><\/div><\/div><\/div><p class=\"qt-label\" style=\"font-size:1.15em;margin:18px 0 10px\"><strong>Step 2:<\/strong> Enter how much time (the answer updates as you type)<\/p><div class=\"qt-grid\"><div class=\"qt-field\"><label for=\"qdc-y\">Years<\/label><input type=\"number\" id=\"qdc-y\" min=\"0\" max=\"9999\" inputmode=\"numeric\" placeholder=\"0\"><\/div><div class=\"qt-field\"><label for=\"qdc-mo\">Months<\/label><input type=\"number\" id=\"qdc-mo\" min=\"0\" max=\"99999\" inputmode=\"numeric\" placeholder=\"0\"><\/div><div class=\"qt-field\"><label for=\"qdc-w\">Weeks<\/label><input type=\"number\" id=\"qdc-w\" min=\"0\" max=\"99999\" inputmode=\"numeric\" placeholder=\"0\"><\/div><div class=\"qt-field\"><label for=\"qdc-d\">Days<\/label><input type=\"number\" id=\"qdc-d\" min=\"0\" max=\"999999\" inputmode=\"numeric\" placeholder=\"0\"><\/div><\/div><div class=\"qt-grid\"><label class=\"qt-check\"><input type=\"checkbox\" id=\"qdc-biz\"> Count weeks and days as business days (Monday to Friday)<\/label><\/div><div class=\"qdc-res\" id=\"qdc-r1\" hidden><p class=\"qdc-big\" id=\"qdc-r1big\"><\/p><p class=\"qdc-sm\" id=\"qdc-r1sm\"><\/p><div class=\"qdc-grid\"><div><b id=\"qdc-r1doy\">0<\/b><span>Day of the year<\/span><\/div><div><b id=\"qdc-r1wk\">0<\/b><span>Week number (ISO)<\/span><\/div><div><b id=\"qdc-r1from\">0<\/b><span>Days from today<\/span><\/div><\/div><\/div><\/div><div id=\"qdc-p-diff\" hidden><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Pick the two dates (the answer updates as you choose)<\/p><div class=\"qt-grid\"><div class=\"qt-field\"><label for=\"qdc-a\">From date<\/label><input type=\"date\" id=\"qdc-a\"><\/div><div class=\"qt-field\"><label for=\"qdc-b\">To date<\/label><input type=\"date\" id=\"qdc-b\"><\/div><\/div><div class=\"qt-grid\"><label class=\"qt-check\"><input type=\"checkbox\" id=\"qdc-incl\"> Include the end date (add 1 day)<\/label><\/div><div class=\"qdc-res\" id=\"qdc-r2\" hidden><p class=\"qdc-big\" id=\"qdc-r2big\"><\/p><p class=\"qdc-sm\" id=\"qdc-r2sm\"><\/p><div class=\"qdc-grid\"><div><b id=\"qdc-r2wk\">0<\/b><span>Weeks and days<\/span><\/div><div><b id=\"qdc-r2biz\">0<\/b><span>Business days (Mon to Fri)<\/span><\/div><div><b id=\"qdc-r2we\">0<\/b><span>Weekend days<\/span><\/div><div><b id=\"qdc-r2mo\">0<\/b><span>Months and days<\/span><\/div><div><b id=\"qdc-r2h\">0<\/b><span>Hours<\/span><\/div><div><b id=\"qdc-r2min\">0<\/b><span>Minutes<\/span><\/div><\/div><\/div><\/div><div class=\"qt-row\"><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qdc-copy\">Copy the answer<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost qtx-nomark\" id=\"qdc-reset\">&#8634; Start over<\/button><\/div><p class=\"qt-status\" id=\"qdc-status\" aria-live=\"polite\"><\/p><p class=\"qt-note\"><strong>Private by design:<\/strong> all date maths runs in your own browser. Nothing is sent to QuickOnlineTips or stored. Business days skip Saturdays and Sundays but not public holidays.<\/p><\/div>\n<script>(function () { function qtReady(fn) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function qtCopy(text, statusEl, okMsg) { function done(ok) { if (statusEl) { statusEl.textContent = ok ? (okMsg || 'Copied to clipboard.') : 'Press Ctrl+C (or Cmd+C) to copy.'; } } function fallback() { var ta = document.createElement('textarea'); ta.value = text; ta.setAttribute('readonly', ''); ta.style.position = 'fixed'; ta.style.top = '-1000px'; document.body.appendChild(ta); ta.select(); var ok = false; try { ok = document.execCommand('copy'); } catch (e) { ok = false; } document.body.removeChild(ta); done(ok); } if (navigator.clipboard) { if (window.isSecureContext) { navigator.clipboard.writeText(text).then(function () { done(true); }, fallback); return; } } fallback(); } qtReady(function () { var root = document.getElementById('qdc'); if (!root) { return; } function $(id) { return document.getElementById('qdc-' + id); } var DN = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], MN = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], tab = 'add', sign = 1, answer = ''; function iso(d) { var m = d.getUTCMonth() + 1, dd = d.getUTCDate(); return d.getUTCFullYear() + '-' + (m > 9 ? m : '0' + m) + '-' + (dd > 9 ? dd : '0' + dd); } function parse(v) { if (!v) { return null; } var p = v.split('-'); if (p.length !== 3) { return null; } var d = new Date(Date.UTC(Number(p[0]), Number(p[1]) - 1, Number(p[2]))); return isNaN(d.getTime()) ? null : d; } function today() { var n = new Date(); return new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())); } function long(d) { return DN[d.getUTCDay()] + ', ' + d.getUTCDate() + ' ' + MN[d.getUTCMonth()] + ' ' + d.getUTCFullYear(); } function dim(y, m) { return new Date(Date.UTC(y, m + 1, 0)).getUTCDate(); } function addMonths(d, n) { var y = d.getUTCFullYear(), m = d.getUTCMonth() + n, ty = y + Math.floor(m \/ 12), tm = ((m % 12) + 12) % 12, day = Math.min(d.getUTCDate(), dim(ty, tm)); return new Date(Date.UTC(ty, tm, day)); } function addDays(d, n) { return new Date(d.getTime() + n * 864e5); } function addBiz(d, n) { var step = n >= 0 ? 1 : -1, left = Math.abs(n), cur = d, guard = 0; while (left > 0) { cur = addDays(cur, step); var wd = cur.getUTCDay(); if (wd !== 0) { if (wd !== 6) { left--; } } guard++; if (guard > 400000) { break; } } return cur; } function days(a, b) { return Math.round((b.getTime() - a.getTime()) \/ 864e5); } function isoWeek(d) { var t = new Date(d.getTime()), wd = (t.getUTCDay() + 6) % 7; t = addDays(t, 3 - wd); var y1 = new Date(Date.UTC(t.getUTCFullYear(), 0, 4)); return 1 + Math.round((days(y1, t) - 3 + ((y1.getUTCDay() + 6) % 7)) \/ 7); } function doy(d) { return days(new Date(Date.UTC(d.getUTCFullYear(), 0, 1)), d) + 1; } function bizBetween(a, b) { var n = days(a, b), full = Math.floor(n \/ 7), biz = full * 5, i, cur = addDays(a, full * 7); for (i = 0; n % 7 > i; i++) { var wd = cur.getUTCDay(); if (wd !== 0) { if (wd !== 6) { biz++; } } cur = addDays(cur, 1); } return biz; } function num(id) { var v = Math.floor(Number($(id).value)); return isNaN(v) ? 0 : Math.max(0, v); } function plural(n, w) { return n + ' ' + w + (n === 1 ? '' : 's'); } function calcAdd() { var s = parse($('start').value), box = $('r1'); if (!s) { box.hidden = true; answer = ''; return; } var y = num('y'), mo = num('mo'), w = num('w'), d = num('d'); if (y + mo + w + d === 0) { box.hidden = true; answer = ''; return; } var r = addMonths(s, sign * (y * 12 + mo)); if ($('biz').checked) { r = addBiz(r, sign * (w * 5 + d)); } else { r = addDays(r, sign * (w * 7 + d)); } if (isNaN(r.getTime())) { box.hidden = true; return; } var parts = []; if (y) { parts.push(plural(y, 'year')); } if (mo) { parts.push(plural(mo, 'month')); } if (w) { parts.push(plural(w, $('biz').checked ? 'business week' : 'week')); } if (d) { parts.push(plural(d, $('biz').checked ? 'business day' : 'day')); } $('r1big').textContent = long(r); $('r1sm').textContent = long(s) + (sign > 0 ? ' plus ' : ' minus ') + parts.join(', '); $('r1doy').textContent = doy(r); $('r1wk').textContent = isoWeek(r); var f = days(today(), r); $('r1from').textContent = f > 0 ? '+' + f : String(f); box.hidden = false; answer = $('r1sm').textContent + ' = ' + long(r); } function calcDiff() { var a = parse($('a').value), b = parse($('b').value), box = $('r2'); if (!a || !b) { box.hidden = true; answer = ''; return; } var neg = a.getTime() > b.getTime(); if (neg) { var t = a; a = b; b = t; } var incl = $('incl').checked, end = incl ? addDays(b, 1) : b, n = days(a, end); var ay = a.getUTCFullYear(), am = a.getUTCMonth(), ad = a.getUTCDate(), by = end.getUTCFullYear(), bm = end.getUTCMonth(), bd = end.getUTCDate(); var Y = by - ay, M = bm - am, D = bd - ad; if (0 > D) { M--; var pm = bm - 1, py = by; if (0 > pm) { pm = 11; py--; } D += dim(py, pm); } if (0 > M) { Y--; M += 12; } var ymd = []; if (Y) { ymd.push(plural(Y, 'year')); } if (M) { ymd.push(plural(M, 'month')); } if (D) { ymd.push(plural(D, 'day')); } if (!ymd.length) { ymd.push('0 days'); } var biz = bizBetween(a, end); $('r2big').textContent = plural(n, 'day'); $('r2sm').textContent = (neg ? 'Counting backwards: ' : '') + 'From ' + long(a) + ' to ' + long(b) + (incl ? ' (end date included)' : '') + ' = ' + ymd.join(', '); $('r2wk').textContent = Math.floor(n \/ 7) + 'w ' + (n % 7) + 'd'; $('r2biz').textContent = biz; $('r2we').textContent = n - biz; $('r2mo').textContent = (Y * 12 + M) + 'm ' + D + 'd'; $('r2h').textContent = (n * 24).toLocaleString(); $('r2min').textContent = (n * 1440).toLocaleString(); box.hidden = false; answer = $('r2sm').textContent + ' (' + plural(n, 'day') + ', ' + biz + ' business days)'; } function calc() { if (tab === 'add') { calcAdd(); } else { calcDiff(); } } Array.prototype.forEach.call($('tabs').getElementsByTagName('button'), function (b) { b.addEventListener('click', function () { tab = b.getAttribute('data-t'); Array.prototype.forEach.call($('tabs').getElementsByTagName('button'), function (x) { x.setAttribute('aria-selected', x === b ? 'true' : 'false'); }); $('p-add').hidden = tab !== 'add'; $('p-diff').hidden = tab !== 'diff'; $('status').textContent = ''; calc(); }); }); Array.prototype.forEach.call($('sign').getElementsByTagName('button'), function (b) { b.addEventListener('click', function () { sign = Number(b.getAttribute('data-v')); Array.prototype.forEach.call($('sign').getElementsByTagName('button'), function (x) { x.setAttribute('aria-pressed', x === b ? 'true' : 'false'); }); calc(); }); }); ['start', 'y', 'mo', 'w', 'd', 'biz', 'a', 'b', 'incl'].forEach(function (id) { $(id).addEventListener('input', calc); $(id).addEventListener('change', calc); }); $('copy').addEventListener('click', function () { if (!answer) { $('status').textContent = 'Step 1 first: enter your dates to get an answer.'; return; } qtCopy(answer, $('status'), 'Answer copied.'); }); $('reset').addEventListener('click', function () { ['y', 'mo', 'w', 'd', 'b'].forEach(function (id) { $(id).value = ''; }); $('start').value = iso(today()); $('a').value = iso(today()); $('biz').checked = false; $('incl').checked = false; $('status').textContent = ''; calc(); }); $('start').value = iso(today()); $('a').value = iso(today()); var q = location.search.match(\/[?]days=(-?[0-9]+)\/); if (q) { var v = Number(q[1]); if (0 > v) { sign = -1; } $('d').value = Math.abs(v); } calc(); }); })();<\/script>\n<div class=\"qt-next\"><p class=\"qt-next-h\">Try another free tool<\/p><div class=\"qt-next-g\"><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/days-between-dates\/\">Days Between Dates<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/age-calculator\/\">Age Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/day-of-the-week\/\">Day of the Week Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/week-number\/\">Week Number Today<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/countdown-to-date\/\">Countdown to a Date<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/printable-calendar\/\">Printable Calendar<\/a><\/div><\/div>\n<p><strong>Quick answer:<\/strong> Use <strong>Option 1<\/strong> to find a date in the future or past: pick a start date, choose Add or Subtract, and type the years, months, weeks or days. Use <strong>Option 2<\/strong> to count the days between two dates, with business days, weekends, weeks and months shown too.<\/p>\n<h2>How to add or subtract days from a date<\/h2>\n<ol>\n<li>Pick the start date. It is set to today when the page opens.<\/li>\n<li>Press <strong>+ Add<\/strong> or <strong>&minus; Subtract<\/strong>.<\/li>\n<li>Type any mix of years, months, weeks and days. The new date appears straight away.<\/li>\n<li>Tick <strong>business days<\/strong> if weekends should not count, for example for delivery times or deadlines.<\/li>\n<\/ol>\n<p>Months are added on the calendar, so 31 January plus 1 month gives the last day of February. Years and months are added first, then weeks and days.<\/p>\n<h2>How to count days between two dates<\/h2>\n<p>Choose Option 2 and pick the two dates. You get the total days plus the same span in weeks and days, months and days, years, months and days, business days, weekend days, hours and minutes. Tick <strong>Include the end date<\/strong> when both the first and last day count, such as a hotel stay counted in days or an event that runs from Monday to Friday.<\/p>\n<h2>Common uses<\/h2>\n<ul>\n<li>Deadlines and notice periods: 30, 60 or 90 days from a date.<\/li>\n<li>Delivery and working-day estimates, such as 10 business days from an order.<\/li>\n<li>Pregnancy, warranty and subscription dates.<\/li>\n<li>Counting how long ago something happened, or how long a project ran.<\/li>\n<\/ul>\n<p>Need your age instead? Try the <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/age-calculator\/\">age calculator<\/a>. To see a live countdown, use <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/countdown-to-date\/\">countdown to a date<\/a>, or print a <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/printable-calendar\/\">free calendar<\/a>.<\/p>\n<h2>FAQ<\/h2>\n<h3>Does the business day count skip holidays?<\/h3>\n<p>It skips Saturdays and Sundays only. Public holidays differ by country and region, so subtract any that fall in your range yourself.<\/p>\n<h3>What is the week number?<\/h3>\n<p>It is the ISO 8601 week number used in Europe and much of the world: weeks start on Monday and week 1 contains the first Thursday of the year.<\/p>\n<h3>Can I count backwards?<\/h3>\n<p>Yes. Press Subtract in Option 1, or put the later date first in Option 2. The tool shows the number of days either way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This free date calculator adds or subtracts days, weeks, months and years from any date, and counts the days between two dates. It can count business days only (Monday to Friday), shows the day of the week, week number and day of the year, and works out the answer as you type. Quick answer: Use&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":65595,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-70002","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=70002"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70002\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/65595"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=70002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}