{"id":100193,"date":"2026-02-15T20:26:03","date_gmt":"2026-02-15T20:26:03","guid":{"rendered":"https:\/\/vibromera.eu\/?post_type=calculator&#038;p=100193"},"modified":"2026-07-13T04:05:00","modified_gmt":"2026-07-13T04:05:00","slug":"predictive-maintenance-roi","status":"publish","type":"calculator","link":"https:\/\/vibromera.eu\/uk\/calculators\/predictive-maintenance-roi\/","title":{"rendered":"Documented Constant Annual Cash-Flow Calculator"},"content":{"rendered":"\n<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"WebApplication\",\"name\":\"Documented Constant Annual Cash-Flow Calculator\",\"description\":\"Calculate present values, net present value, a defined discounted return on outlays, benefit-cost ratio, and simple payback from user-supplied constant annual cash-flow assumptions.\",\"url\":\"https:\/\/vibromera.eu\/calculators\/predictive-maintenance-roi\/\",\"applicationCategory\":\"FinancialApplication\",\"operatingSystem\":\"Any\",\"offers\":{\"@type\":\"Offer\",\"price\":\"0\"},\"creator\":{\"@type\":\"Organization\",\"name\":\"Vibromera\",\"url\":\"https:\/\/vibromera.eu\/\"},\"dateModified\":\"2026-07-13\",\"inLanguage\":\"en\",\"isAccessibleForFree\":true}<\/script>\n<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"Does this calculator prove predictive-maintenance savings?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. It performs arithmetic on supplied incremental cash-flow assumptions. The baseline, attribution, evidence, risk, and uncertainty must be assessed separately.\"}},{\"@type\":\"Question\",\"name\":\"What does discounted return on outlays mean here?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"It is the calculator-defined ratio NPV divided by the present value of initial and recurring outlays. It is not IRR and is not presented as a universal ROI definition.\"}},{\"@type\":\"Question\",\"name\":\"How are annual cash flows timed?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The model treats each constant annual benefit and recurring cost as occurring at the end of each year. Residual value occurs at the end of the selected horizon.\"}},{\"@type\":\"Question\",\"name\":\"Is simple payback discounted?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. Simple payback is initial investment divided by constant annual net cash flow. It ignores discounting, residual value, and cash flows after payback.\"}},{\"@type\":\"Question\",\"name\":\"Is the HM Treasury Green Book a commercial PdM standard?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. It is cited only as an official, transparent example of lifetime appraisal, discounting, and risk and sensitivity treatment. This calculator is not an ISO or HM Treasury compliance tool.\"}}]}<\/script>\n<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"BreadcrumbList\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vibromera.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calculators\",\"item\":\"https:\/\/vibromera.eu\/calculators\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Documented Cash-Flow Calculator\",\"item\":\"https:\/\/vibromera.eu\/calculators\/predictive-maintenance-roi\/\"}]}<\/script>\n<style>\n:root{--vc-bg:#f4f1ec;--vc-surface:#fff;--vc-alt:#f8f6f2;--vc-ink:#1a1a1a;--vc-secondary:#5a5650;--vc-muted:#807b73;--vc-accent:#b84f22;--vc-accent-light:#fdf0ea;--vc-green:#20683e;--vc-green-light:#eaf8ef;--vc-yellow:#825f00;--vc-yellow-light:#fff8dc;--vc-red:#9d2b24;--vc-red-light:#fff0ee;--vc-border:#d9d4cc;--vc-border-light:#e8e4dd;--vc-shadow:0 1px 3px rgba(26,26,26,.06),0 4px 12px rgba(26,26,26,.04);--vc-radius:8px;--vc-font:-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;--vc-mono:\"SFMono-Regular\",Consolas,monospace;--vc-display:Georgia,serif}\n.vc-calculator{font-family:var(--vc-font);font-size:15px;line-height:1.62;color:var(--vc-ink);max-width:980px;margin:0 auto;padding:20px 16px 40px}.vc-calculator *{box-sizing:border-box}.vc-header{text-align:center;padding:42px 20px 34px}.vc-eyebrow{font:600 11px\/1.4 var(--vc-mono);letter-spacing:.13em;text-transform:uppercase;color:var(--vc-accent);margin:0 0 10px}.vc-title{font:700 clamp(25px,4vw,37px)\/1.15 var(--vc-display);margin:0 0 14px}.vc-subtitle{color:var(--vc-secondary);max-width:700px;margin:0 auto 18px}.vc-badges{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.vc-badge{font:500 11px\/1.4 var(--vc-mono);padding:5px 9px;border:1px solid var(--vc-border);border-radius:5px;background:var(--vc-surface)}\n.vc-card,.vc-section{background:var(--vc-surface);border:1px solid var(--vc-border);border-radius:12px;box-shadow:var(--vc-shadow);overflow:hidden;margin-top:24px}.vc-form{padding:24px}.vc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.vc-wide{grid-column:1\/-1}.vc-field{display:flex;flex-direction:column}.vc-label{font-size:12px;font-weight:700;letter-spacing:.035em;text-transform:uppercase;color:var(--vc-secondary);margin-bottom:6px}.vc-hint{font-size:11px;font-weight:400;text-transform:none;letter-spacing:0;color:var(--vc-muted)}.vc-input{width:100%;padding:10px 12px;border:1.5px solid var(--vc-border);border-radius:6px;font:14px var(--vc-font);color:var(--vc-ink);background:var(--vc-surface)}.vc-input:focus{outline:none;border-color:var(--vc-accent);box-shadow:0 0 0 3px rgba(184,79,34,.12)}.vc-check{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--vc-border);border-radius:7px;background:var(--vc-alt);font-size:13px;color:var(--vc-secondary)}.vc-check input{margin-top:3px;flex:0 0 auto}.vc-error{display:none;margin:0 24px 24px;padding:12px 14px;border-left:4px solid var(--vc-red);background:var(--vc-red-light);color:var(--vc-red);border-radius:4px}.vc-error.vc-show{display:block}\n.vc-results{display:none;border-top:1px solid var(--vc-border-light);background:var(--vc-alt);padding:24px}.vc-results.vc-visible{display:block}.vc-results-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.vc-results-title{font:700 21px var(--vc-display);margin:0}.vc-copy{padding:6px 11px;border:1px solid var(--vc-border);border-radius:6px;background:#fff;cursor:pointer}.vc-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.vc-result{padding:15px;background:#fff;border:1px solid var(--vc-border-light);border-radius:8px;min-width:0}.vc-result-primary{grid-column:span 2;border:2px solid var(--vc-accent);background:linear-gradient(135deg,var(--vc-accent-light),#fff)}.vc-result-label{font:600 10px\/1.4 var(--vc-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--vc-muted);margin-bottom:5px}.vc-result-value{font:600 20px\/1.3 var(--vc-mono);overflow-wrap:anywhere}.vc-result-primary .vc-result-value{font-size:27px;color:var(--vc-accent)}.vc-unit{font-size:12px;font-weight:400;color:var(--vc-secondary)}\n.vc-section-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;padding:17px 22px;border:0;background:transparent;text-align:left;cursor:pointer}.vc-section-title{font:700 18px var(--vc-display)}.vc-chevron{transition:transform .2s}.vc-section.vc-open .vc-chevron{transform:rotate(180deg)}.vc-section-body{display:none}.vc-section.vc-open .vc-section-body{display:block}.vc-section-inner{padding:0 22px 22px;border-top:1px solid var(--vc-border-light);color:var(--vc-secondary)}.vc-section-inner h3{font:700 17px var(--vc-display);color:var(--vc-ink);margin:22px 0 9px}.vc-section-inner p,.vc-section-inner li{font-size:14px}.vc-formula{font:500 13px\/1.7 var(--vc-mono);padding:13px 15px;border:1px solid var(--vc-border);border-radius:6px;background:var(--vc-alt);overflow-x:auto;white-space:normal}.vc-warning{padding:13px 15px;border-left:4px solid var(--vc-yellow);background:var(--vc-yellow-light);color:#5d4708;border-radius:4px;margin:14px 0}.vc-table{width:100%;border-collapse:collapse;margin:14px 0;font-size:13px}.vc-table th,.vc-table td{padding:9px 10px;border:1px solid var(--vc-border-light);text-align:left;vertical-align:top}.vc-table th{background:var(--vc-alt);color:var(--vc-ink)}.vc-faq{border:1px solid var(--vc-border-light);border-radius:6px;margin-top:8px}.vc-faq button{width:100%;padding:13px 14px;border:0;background:var(--vc-alt);font-weight:700;text-align:left;cursor:pointer}.vc-faq div{display:none;padding:13px 14px;border-top:1px solid var(--vc-border-light)}.vc-faq.vc-open div{display:block}.vc-related{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.vc-related a{padding:7px 12px;border:1px solid var(--vc-border);border-radius:6px;text-decoration:none;color:var(--vc-secondary)}.vc-footer{text-align:center;padding:28px 12px;color:var(--vc-muted);font-size:12px}.vc-footer a{color:var(--vc-accent)}\n@media(max-width:700px){.vc-grid,.vc-result-grid{grid-template-columns:1fr}.vc-result-primary{grid-column:auto}.vc-form{padding:18px}.vc-results{padding:18px}}@media print{.vc-section-body,.vc-results{display:block!important}.vc-copy,.vc-chevron{display:none}}\n<\/style>\n<div class=\"vc-calculator\">\n<header class=\"vc-header\"><p class=\"vc-eyebrow\">Documented engineering arithmetic<\/p><h1 class=\"vc-title\">Constant Annual Cash-Flow Calculator<\/h1><p class=\"vc-subtitle\">A transparent present-value model for a proposed predictive-maintenance programme or another investment. It calculates only from your documented incremental assumptions; it does not predict or prove savings.<\/p><div class=\"vc-badges\"><span class=\"vc-badge\">End-of-year cash flows<\/span><span class=\"vc-badge\">Explicit metric definitions<\/span><span class=\"vc-badge\">Not an ISO formula<\/span><\/div><\/header>\n<div class=\"vc-card\"><form class=\"vc-form\" id=\"vc-form\" novalidate><div class=\"vc-grid\">\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-initial\">Initial investment C\u2080 <span class=\"vc-hint\">(currency units, time 0)<\/span><\/label><input class=\"vc-input\" id=\"vc-initial\" inputmode=\"decimal\" aria-describedby=\"vc-assumptions\"><\/div>\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-benefit\">Annual gross incremental benefit B <span class=\"vc-hint\">(currency units\/year)<\/span><\/label><input class=\"vc-input\" id=\"vc-benefit\" inputmode=\"decimal\"><\/div>\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-cost\">Annual recurring incremental cost C <span class=\"vc-hint\">(currency units\/year)<\/span><\/label><input class=\"vc-input\" id=\"vc-cost\" inputmode=\"decimal\"><\/div>\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-horizon\">Appraisal horizon N <span class=\"vc-hint\">(whole years, 1\u20131000)<\/span><\/label><input class=\"vc-input\" id=\"vc-horizon\" inputmode=\"numeric\"><\/div>\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-rate\">Annual discount rate r <span class=\"vc-hint\">(%, 0\u20131000)<\/span><\/label><input class=\"vc-input\" id=\"vc-rate\" inputmode=\"decimal\"><\/div>\n<div class=\"vc-field\"><label class=\"vc-label\" for=\"vc-residual\">Residual value R at year N <span class=\"vc-hint\">(currency units)<\/span><\/label><input class=\"vc-input\" id=\"vc-residual\" inputmode=\"decimal\"><\/div>\n<div class=\"vc-field vc-wide\"><label class=\"vc-label\" for=\"vc-source\">Evidence \/ assumption set <span class=\"vc-hint\">(required; identify baseline, data source and price basis)<\/span><\/label><input class=\"vc-input\" id=\"vc-source\"><\/div>\n<label class=\"vc-check vc-wide\" id=\"vc-assumptions\"><input type=\"checkbox\" id=\"vc-confirm\"><span>I confirm that all money values are incremental versus the same documented baseline, use one currency and price basis, the rate matches that basis (real with real or nominal with nominal), benefits are not double-counted, and uncertainty will be assessed separately.<\/span><\/label>\n<\/div><\/form><div class=\"vc-error\" id=\"vc-error\" role=\"alert\"><\/div>\n<div class=\"vc-results\" id=\"vc-results\" aria-live=\"polite\"><div class=\"vc-results-head\"><h2 class=\"vc-results-title\">Model results<\/h2><button type=\"button\" class=\"vc-copy\" id=\"vc-copy\">Copy<\/button><\/div><div class=\"vc-result-grid\">\n<div class=\"vc-result vc-result-primary\"><div class=\"vc-result-label\">Net present value (NPV)<\/div><div class=\"vc-result-value\" id=\"vc-r-npv\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">Discounted return on outlays<\/div><div class=\"vc-result-value\" id=\"vc-r-roi\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">Benefit-cost ratio<\/div><div class=\"vc-result-value\" id=\"vc-r-bcr\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">PV gross benefits<\/div><div class=\"vc-result-value\" id=\"vc-r-pvb\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">PV total outlays<\/div><div class=\"vc-result-value\" id=\"vc-r-pvc\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">Annual net cash flow B \u2212 C<\/div><div class=\"vc-result-value\" id=\"vc-r-net\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">Simple payback<\/div><div class=\"vc-result-value\" id=\"vc-r-payback\">\u2014<\/div><\/div>\n<div class=\"vc-result\"><div class=\"vc-result-label\">PV residual value<\/div><div class=\"vc-result-value\" id=\"vc-r-pvr\">\u2014<\/div><\/div>\n<\/div><\/div><\/div>\n\n<section class=\"vc-section vc-open\"><button type=\"button\" class=\"vc-section-toggle\" aria-expanded=\"true\"><span class=\"vc-section-title\">Definitions, formula and scope<\/span><span class=\"vc-chevron\">\u2304<\/span><\/button><div class=\"vc-section-body\"><div class=\"vc-section-inner\">\n<h3>Model and timing<\/h3><p>For years <em>t<\/em> = 1 \u2026 <em>N<\/em>, the model places the constant annual gross benefit B and recurring incremental cost C at each year-end. Initial investment C\u2080 occurs at time 0. Residual value R occurs at the end of year N. With d = r\/100:<\/p>\n<div class=\"vc-formula\">PV(B) = \u03a3[B\/(1+d)<sup>t<\/sup>]&nbsp;&nbsp; PV(C) = \u03a3[C\/(1+d)<sup>t<\/sup>]&nbsp;&nbsp; PV(R) = R\/(1+d)<sup>N<\/sup><br>PV(outlays) = C\u2080 + PV(C)<br>NPV = PV(B) + PV(R) \u2212 PV(outlays)<br>Discounted return on outlays = NPV \/ PV(outlays) \u00d7 100%<br>BCR = [PV(B) + PV(R)] \/ PV(outlays)<br>Simple payback = C\u2080\/(B\u2212C) years, only when B\u2212C &gt; 0<\/div>\n<table class=\"vc-table\"><thead><tr><th>Quantity<\/th><th>Meaning and unit<\/th><\/tr><\/thead><tbody><tr><td>C\u2080<\/td><td>Incremental investment paid at time 0; currency units<\/td><\/tr><tr><td>B<\/td><td>Constant annual gross incremental benefit; currency units\/year<\/td><\/tr><tr><td>C<\/td><td>Constant annual recurring incremental outlay; currency units\/year<\/td><\/tr><tr><td>N<\/td><td>Appraisal horizon; whole years<\/td><\/tr><tr><td>r<\/td><td>Annual discount rate entered as percent\/year<\/td><\/tr><tr><td>R<\/td><td>Residual value received at end of year N; currency units<\/td><\/tr><\/tbody><\/table>\n<div class=\"vc-warning\"><strong>Boundary:<\/strong> these are deterministic arithmetic outputs, not proof that maintenance caused a benefit. The model excludes taxes, financing, depreciation, uneven cash flows, downtime probability, confidence intervals, and non-monetised effects. Use a dated baseline, avoid double counting, and perform sensitivity\/risk analysis before a decision.<\/div>\n<h3>What \u201cROI\u201d means on this page<\/h3><p>\u201cDiscounted return on outlays\u201d is deliberately labelled and defined as NPV divided by PV(outlays). ROI has multiple conventions; this result is not IRR, accounting ROI, or a guaranteed PdM return. BCR and NPV are shown separately so the denominator cannot be mistaken.<\/p>\n<h3>Source classification<\/h3><p>This is general discounted cash-flow arithmetic, not a formula prescribed by ISO. HM Treasury\u2019s <a href=\"https:\/\/www.gov.uk\/government\/publications\/the-green-book-appraisal-and-evaluation-in-central-government\/the-green-book-2026\" target=\"_blank\" rel=\"noopener\">Green Book (2026)<\/a> is an official methodological reference for lifetime costs and benefits, discounting, NPV\/BCR, uncertainty and sensitivity analysis. Its public-sector scope and prescribed rates are not imported as commercial PdM defaults. See also the official <a href=\"https:\/\/www.gov.uk\/government\/publications\/green-book-supplementary-guidance-discounting\" target=\"_blank\" rel=\"noopener\">discounting guidance<\/a>. Accessed 13 July 2026.<\/p>\n<\/div><\/div><\/section>\n<section class=\"vc-section\"><button type=\"button\" class=\"vc-section-toggle\" aria-expanded=\"false\"><span class=\"vc-section-title\">Worked example<\/span><span class=\"vc-chevron\">\u2304<\/span><\/button><div class=\"vc-section-body\"><div class=\"vc-section-inner\"><p>For C\u2080 = 100, B = 50\/year, C = 10\/year, N = 5, r = 0% and R = 0: PV(B) = 250, PV(outlays) = 150, NPV = 100, discounted return on outlays = 66.6667%, BCR = 1.6667, annual net cash flow = 40\/year, and simple payback = 2.5 years. This is an arithmetic test case, not a typical plant claim.<\/p><\/div><\/div><\/section>\n<section class=\"vc-section\"><button type=\"button\" class=\"vc-section-toggle\" aria-expanded=\"false\"><span class=\"vc-section-title\">Frequently asked questions<\/span><span class=\"vc-chevron\">\u2304<\/span><\/button><div class=\"vc-section-body\"><div class=\"vc-section-inner\">\n<div class=\"vc-faq\"><button type=\"button\">Does this calculator prove predictive-maintenance savings?<\/button><div>No. It performs arithmetic on supplied incremental cash-flow assumptions. Establish the counterfactual baseline and attribution with project evidence.<\/div><\/div>\n<div class=\"vc-faq\"><button type=\"button\">Why are there no plant presets or \u201ctypical ROI\u201d values?<\/button><div>Plant costs, failure consequences, avoided events and evidence quality are project-specific. Unreferenced presets would create false precision and could bias a decision.<\/div><\/div>\n<div class=\"vc-faq\"><button type=\"button\">Is simple payback discounted?<\/button><div>No. It ignores discounting and residual value. If the constant annual net cash flow is non-positive, there is no simple payback under this model.<\/div><\/div>\n<div class=\"vc-faq\"><button type=\"button\">Can I mix real and nominal values?<\/button><div>No. Use real cash flows with a real discount rate, or nominal cash flows with a nominal rate, all in the same currency and price basis.<\/div><\/div>\n<\/div><\/div><\/section>\n<section class=\"vc-section\"><button type=\"button\" class=\"vc-section-toggle\" aria-expanded=\"false\"><span class=\"vc-section-title\">Related calculators<\/span><span class=\"vc-chevron\">\u2304<\/span><\/button><div class=\"vc-section-body\"><div class=\"vc-section-inner\"><div class=\"vc-related\"><a href=\"\/calculators\/downtime-cost-calculator\/\">Downtime cost<\/a><a href=\"\/calculators\/mtbf-mttr-availability\/\">MTBF \/ MTTR availability<\/a><\/div><\/div><\/div><\/section>\n<footer class=\"vc-footer\">Reference calculation only; independent engineering and financial review remains necessary. \u00b7 <a href=\"\/calculators\/engineering-calculators\/\">All calculators<\/a><\/footer>\n<\/div>\n<script>\n(function(){\n\"use strict\";\nfunction byId(id){return document.getElementById(id)}\nfunction parseDecimal(text){var s=String(text).trim();if(!s||\/[eE]\/.test(s)||!\/^[-+]?(?:\\d+(?:[.,]\\d*)?|[.,]\\d+)$\/.test(s)||(\/[.,]\/.test(s)&&s.indexOf('.')>=0&&s.indexOf(',')>=0))return null;var n=Number(s.replace(',','.'));return Number.isFinite(n)?n:null}\nfunction cashFlowModel(x){var initial=x.initial,benefit=x.benefit,cost=x.cost,horizon=x.horizon,ratePct=x.ratePct,residual=x.residual;if(![initial,benefit,cost,horizon,ratePct,residual].every(Number.isFinite))throw new Error('All numeric inputs must be finite.');if(initial<0||benefit<0||cost<0||residual<0)throw new Error('Money inputs cannot be negative.');if(!Number.isInteger(horizon)||horizon<1||horizon>1000)throw new Error('Horizon must be a whole number from 1 to 1000 years.');if(ratePct<0||ratePct>1000)throw new Error('Discount rate must be from 0% to 1000%.');var d=ratePct\/100,pvBenefit=0,pvRecurring=0,factor=1;for(var t=1;t<=horizon;t++){factor\/=1+d;pvBenefit+=benefit*factor;pvRecurring+=cost*factor}var pvResidual=residual*factor;var pvOutlays=initial+pvRecurring;var npv=pvBenefit+pvResidual-pvOutlays;var annualNet=benefit-cost;var roi=pvOutlays>0?npv\/pvOutlays*100:null;var bcr=pvOutlays>0?(pvBenefit+pvResidual)\/pvOutlays:null;var payback=initial===0?0:(annualNet>0?initial\/annualNet:null);return{pvBenefit:pvBenefit,pvRecurring:pvRecurring,pvResidual:pvResidual,pvOutlays:pvOutlays,npv:npv,annualNet:annualNet,roi:roi,bcr:bcr,payback:payback}}\nwindow.vbmCashFlowModel=cashFlowModel;\nfunction formatNumber(n,d){if(!Number.isFinite(n))return '\u2014';var a=Math.abs(n);var digits=d;if(digits==null)digits=a!==0&&a<0.01?6:(a<100?4:2);return n.toLocaleString('en-US',{maximumFractionDigits:digits,minimumFractionDigits:0})}\nfunction money(n){return formatNumber(n)+' <span class=\"vc-unit\">currency units<\/span>'}\nfunction fail(message){byId('vc-error').textContent=message;byId('vc-error').classList.add('vc-show');byId('vc-results').classList.remove('vc-visible')}\nfunction calculate(){var source=byId('vc-source').value.trim();if(!byId('vc-confirm').checked)return fail('Confirm the stated cash-flow basis before calculating.');if(source.length<3)return fail('Identify the evidence or assumption set used for the inputs.');var raw={initial:parseDecimal(byId('vc-initial').value),benefit:parseDecimal(byId('vc-benefit').value),cost:parseDecimal(byId('vc-cost').value),horizon:parseDecimal(byId('vc-horizon').value),ratePct:parseDecimal(byId('vc-rate').value),residual:parseDecimal(byId('vc-residual').value)};if(Object.keys(raw).some(function(k){return raw[k]===null}))return fail('Use complete decimal numbers with either a point or a comma. Do not use exponents or thousands separators.');var result;try{result=cashFlowModel(raw)}catch(error){return fail(error.message)}byId('vc-error').classList.remove('vc-show');byId('vc-r-npv').innerHTML=money(result.npv);byId('vc-r-roi').innerHTML=result.roi===null?'Undefined <span class=\"vc-unit\">(zero outlays)<\/span>':formatNumber(result.roi,4)+' <span class=\"vc-unit\">%<\/span>';byId('vc-r-bcr').innerHTML=result.bcr===null?'Undefined <span class=\"vc-unit\">(zero outlays)<\/span>':formatNumber(result.bcr,4);byId('vc-r-pvb').innerHTML=money(result.pvBenefit);byId('vc-r-pvc').innerHTML=money(result.pvOutlays);byId('vc-r-net').innerHTML=formatNumber(result.annualNet)+' <span class=\"vc-unit\">currency units\/year<\/span>';byId('vc-r-pvr').innerHTML=money(result.pvResidual);var p;if(result.payback===null)p='No simple payback <span class=\"vc-unit\">(annual net \u2264 0)<\/span>';else if(result.payback===0)p='Immediate <span class=\"vc-unit\">under this model<\/span>';else p=formatNumber(result.payback,4)+' <span class=\"vc-unit\">years'+(result.payback>raw.horizon?' \u2014 beyond horizon':'')+'<\/span>';byId('vc-r-payback').innerHTML=p;byId('vc-results').classList.add('vc-visible')}\nbyId('vc-form').addEventListener('input',calculate);byId('vc-form').addEventListener('change',calculate);document.querySelectorAll('.vc-section-toggle').forEach(function(button){button.addEventListener('click',function(){var section=this.closest('.vc-section');section.classList.toggle('vc-open');this.setAttribute('aria-expanded',section.classList.contains('vc-open')?'true':'false')})});document.querySelectorAll('.vc-faq button').forEach(function(button){button.addEventListener('click',function(){this.parentNode.classList.toggle('vc-open')})});byId('vc-copy').addEventListener('click',function(){var text=byId('vc-results').innerText+'\\nEvidence \/ assumption set: '+byId('vc-source').value.trim();if(navigator.clipboard)navigator.clipboard.writeText(text)});\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Calculate present values, NPV, a defined discounted return on outlays, BCR and simple payback from documented constant annual cash-flow assumptions.<\/p>","protected":false},"featured_media":0,"template":"","meta":{"ai_generated_summary":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-100193","calculator","type-calculator","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/calculator\/100193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/calculator"}],"about":[{"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/types\/calculator"}],"version-history":[{"count":3,"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/calculator\/100193\/revisions"}],"predecessor-version":[{"id":102532,"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/calculator\/100193\/revisions\/102532"}],"wp:attachment":[{"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/media?parent=100193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/categories?post=100193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vibromera.eu\/uk\/wp-json\/wp\/v2\/tags?post=100193"}],"curies":[{"name":"\u0412\u041f","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}