{"id":100215,"date":"2026-02-15T20:27:48","date_gmt":"2026-02-15T20:27:48","guid":{"rendered":"https:\/\/vibromera.eu\/?post_type=calculator&#038;p=100215"},"modified":"2026-07-14T23:33:26","modified_gmt":"2026-07-14T23:33:26","slug":"rul-prognostics-calculator","status":"publish","type":"calculator","link":"https:\/\/vibromera.eu\/hi\/calculators\/rul-prognostics-calculator\/","title":{"rendered":"Documented Linear Threshold-Projection Worksheet"},"content":{"rendered":"\n<script type=\"application\/ld+json\">\n{\"@context\":\"https:\/\/schema.org\",\"@type\":\"WebApplication\",\"name\":\"Documented Linear Threshold-Projection Worksheet\",\"description\":\"Fit a controlled straight-line least-squares trend and calculate an analytical future threshold crossing within a user-declared horizon. This is not an ISO RUL or confidence calculator.\",\"url\":\"https:\/\/vibromera.eu\/calculators\/rul-prognostics-calculator\/\",\"applicationCategory\":\"EngineeringApplication\",\"operatingSystem\":\"Any\",\"isAccessibleForFree\":true,\"creator\":{\"@type\":\"Organization\",\"name\":\"Vibromera\",\"url\":\"https:\/\/vibromera.eu\/\"}}\n<\/script>\n\n<style>\n.vbm215{--ink:#17212b;--muted:#52606d;--line:#cfd8df;--soft:#f5f8fa;--blue:#075b89;--blue2:#073d5b;--ok:#18794e;--okbg:#edf8f2;--warn:#8a5700;--warnbg:#fff8e6;--bad:#b42318;--badbg:#fff1f0;max-width:1000px;margin:0 auto;color:var(--ink);font:16px\/1.58 system-ui,-apple-system,\"Segoe UI\",sans-serif}.vbm215 *{box-sizing:border-box}.vbm215 h1,.vbm215 h2,.vbm215 h3{line-height:1.2;color:#102a3a}.vbm215 h1{margin:8px 0 14px;font-size:clamp(30px,5vw,46px)}.vbm215 h2{margin:0;font-size:25px}.vbm215 h3{margin:26px 0 8px;font-size:19px}.vbm215 p{margin:9px 0}.vbm215 a{color:#075b89}.vbm215-hero{padding:34px 28px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,#eef7fb,#fff)}.vbm215-kicker{font-size:13px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--blue)}.vbm215-lead{max-width:820px;font-size:18px}.vbm215-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.vbm215-badge{padding:5px 10px;border:1px solid #a8c9da;border-radius:999px;background:#fff;color:var(--blue2);font-size:13px;font-weight:750}.vbm215-alert{margin-top:20px;padding:13px 15px;border-left:4px solid var(--warn);border-radius:5px;background:var(--warnbg)}.vbm215-card,.vbm215-section{margin-top:24px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 5px 18px rgba(24,44,58,.06);overflow:hidden}.vbm215-card-h{padding:20px 22px;border-bottom:1px solid var(--line);background:var(--soft)}.vbm215-body,.vbm215-section{padding:22px}.vbm215-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.vbm215-field{min-width:0}.vbm215-field.full,.vbm215-fieldset,.vbm215-data{grid-column:1\/-1}.vbm215 label{display:block;margin-bottom:6px;font-weight:750}.vbm215 input,.vbm215 select{width:100%;min-height:46px;padding:10px 12px;border:1.5px solid #9dacb7;border-radius:7px;background:#fff;color:var(--ink);font:inherit}.vbm215 input:focus,.vbm215 select:focus{outline:3px solid rgba(7,91,137,.2);border-color:var(--blue)}.vbm215-hint{display:block;margin-top:5px;color:var(--muted);font-size:13px}.vbm215-data{overflow-x:auto}.vbm215-data table{min-width:570px}.vbm215-fieldset{padding:15px;border:1px solid var(--line);border-radius:8px}.vbm215-fieldset legend{padding:0 6px;font-weight:800}.vbm215-check{display:flex!important;align-items:flex-start;gap:9px;margin:8px 0!important;font-weight:500!important}.vbm215-check input{width:18px;min-height:18px;margin-top:4px;flex:0 0 auto}.vbm215-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.vbm215-btn{min-height:44px;padding:10px 18px;border:0;border-radius:7px;background:var(--blue);color:#fff;font:750 15px\/1.2 inherit;cursor:pointer}.vbm215-btn:hover{background:var(--blue2)}.vbm215-btn.secondary{border:1px solid #9dacb7;background:#fff;color:var(--ink)}.vbm215-error{display:none;margin-top:15px;padding:12px 14px;border-left:4px solid var(--bad);border-radius:5px;background:var(--badbg);color:#7a1b15}.vbm215-error.show{display:block}.vbm215-results{display:none}.vbm215-results.show{display:block}.vbm215-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.vbm215-result{padding:15px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}.vbm215-result.primary{grid-column:1\/-1;border:2px solid var(--blue);background:#edf7fc}.vbm215-result-label{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.vbm215-result-value{margin-top:4px;font:750 20px\/1.35 ui-monospace,\"Cascadia Mono\",monospace;overflow-wrap:anywhere}.vbm215-result.primary .vbm215-result-value{color:var(--blue2);font-size:27px}.vbm215-result-note{margin-top:4px;color:var(--muted);font-size:13px}.vbm215-pass{margin-top:15px;padding:12px 14px;border-left:4px solid var(--ok);border-radius:5px;background:var(--okbg);color:#194b33}.vbm215-equation{margin:12px 0;padding:13px;border:1px solid #b7ccd8;border-radius:7px;background:#f3f9fc;text-align:center;font:750 16px\/1.5 ui-monospace,\"Cascadia Mono\",monospace;overflow-wrap:anywhere}.vbm215-table-wrap{overflow-x:auto}.vbm215 table{width:100%;border-collapse:collapse;margin:12px 0;font-size:14px}.vbm215 th,.vbm215 td{padding:9px;border:1px solid var(--line);text-align:left;vertical-align:top}.vbm215 th{background:var(--soft)}.vbm215-source{margin:8px 0}.vbm215-limit{padding:14px;border-left:4px solid var(--warn);background:var(--warnbg)}.vbm215-footer{margin-top:24px;padding:16px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}\n@media(max-width:720px){.vbm215-grid,.vbm215-result-grid{grid-template-columns:1fr}.vbm215-result.primary,.vbm215-field.full,.vbm215-fieldset,.vbm215-data{grid-column:1}.vbm215-body,.vbm215-section,.vbm215-hero{padding:16px}.vbm215-actions .vbm215-btn{flex:1 1 150px}}\n<\/style>\n\n<main class=\"vbm215\">\n  <header class=\"vbm215-hero\">\n    <div class=\"vbm215-kicker\">Controlled straight-line extrapolation \u00b7 non-normative worksheet<\/div>\n    <h1>Documented Linear Threshold-Projection Worksheet<\/h1>\n    <p class=\"vbm215-lead\">Fit one documented indicator history with ordinary linear least squares and calculate its analytical crossing of a user-sourced threshold inside a declared extrapolation horizon.<\/p>\n    <div class=\"vbm215-badges\"><span class=\"vbm215-badge\">no invented confidence<\/span><span class=\"vbm215-badge\">no universal vibration limit<\/span><span class=\"vbm215-badge\">analytical crossing<\/span><span class=\"vbm215-badge\">current ISO status<\/span><\/div>\n    <div class=\"vbm215-alert\"><strong>This is not an ISO RUL calculator or a failure-probability model.<\/strong> ISO 13381-1:2025 provides current guidance and requirements for prognosis processes; its public scope does not establish this worksheet&#8217;s regression formula, a universal alarm threshold, or a rule that converts R\u00b2 into confidence. The withdrawn ISO 13381-1:2015 edition is not presented as current.<\/div>\n  <\/header>\n\n  <section class=\"vbm215-card\" aria-labelledby=\"vbm215-input-title\">\n    <div class=\"vbm215-card-h\"><h2 id=\"vbm215-input-title\">Controlled projection inputs<\/h2><p>Use one indicator, one operating regime and one time coordinate. The last row is treated as the current observation.<\/p><\/div>\n    <div class=\"vbm215-body\">\n      <form id=\"vbm215-form\" novalidate>\n        <div class=\"vbm215-grid\">\n          <div class=\"vbm215-field\"><label for=\"vbm215-direction\">Threshold direction<\/label><select id=\"vbm215-direction\"><option value=\"increasing\">Increasing indicator; upper threshold<\/option><option value=\"decreasing\">Decreasing indicator; lower threshold<\/option><\/select><\/div>\n          <div class=\"vbm215-field\"><label for=\"vbm215-time-unit\">Time-coordinate unit label<\/label><input id=\"vbm215-time-unit\" autocomplete=\"off\" placeholder=\"h, d, cycles, starts\"><\/div>\n          <div class=\"vbm215-field\"><label for=\"vbm215-indicator\">Indicator name<\/label><input id=\"vbm215-indicator\" autocomplete=\"off\" placeholder=\"documented measured quantity\"><\/div>\n          <div class=\"vbm215-field\"><label for=\"vbm215-indicator-unit\">Indicator unit label<\/label><input id=\"vbm215-indicator-unit\" autocomplete=\"off\" placeholder=\"mm\/s RMS, \u00b0C, \u03bcm, ppm\"><\/div>\n          <div class=\"vbm215-field\"><label for=\"vbm215-threshold\">Documented threshold L<\/label><input id=\"vbm215-threshold\" inputmode=\"decimal\" autocomplete=\"off\" placeholder=\"blank\"><span class=\"vbm215-hint\">No default is supplied. The threshold must use the same quantity and unit as every y value.<\/span><\/div>\n          <div class=\"vbm215-field\"><label for=\"vbm215-horizon\">Maximum allowed future projection span<\/label><input id=\"vbm215-horizon\" inputmode=\"decimal\" autocomplete=\"off\" placeholder=\"blank\"><span class=\"vbm215-hint\">Same time-coordinate unit. A crossing beyond this user-controlled horizon is not reported.<\/span><\/div>\n          <div class=\"vbm215-field full\"><label for=\"vbm215-threshold-source\">Threshold source, revision and applicability<\/label><input id=\"vbm215-threshold-source\" autocomplete=\"off\" placeholder=\"alarm\/failure criterion and exact scope\"><\/div>\n          <div class=\"vbm215-field full\"><label for=\"vbm215-data-source\">Measurement\/data source and revision<\/label><input id=\"vbm215-data-source\" autocomplete=\"off\" placeholder=\"instrument, database, tag and revision\"><\/div>\n          <div class=\"vbm215-field full\"><label for=\"vbm215-regime\">Operating regime and measurement-condition record<\/label><input id=\"vbm215-regime\" autocomplete=\"off\" placeholder=\"load, speed, sensor, location, processing and environmental condition\"><\/div>\n          <div class=\"vbm215-field full\"><label for=\"vbm215-use\">Calculation ID and intended decision boundary<\/label><input id=\"vbm215-use\" autocomplete=\"off\" placeholder=\"record ID; screening\/review purpose only\"><\/div>\n\n          <div class=\"vbm215-data\">\n            <table aria-label=\"Trend data points\">\n              <thead><tr><th>Point<\/th><th>Time coordinate t<\/th><th>Indicator y<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td>1<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 1 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 1 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>2<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 2 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 2 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>3<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 3 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 3 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>4<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 4 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 4 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>5<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 5 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 5 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>6<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 6 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 6 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>7<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 7 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 7 indicator\" autocomplete=\"off\"><\/td><\/tr>\n                <tr><td>8<\/td><td><input class=\"vbm215-t\" inputmode=\"decimal\" aria-label=\"Point 8 time\" autocomplete=\"off\"><\/td><td><input class=\"vbm215-y\" inputmode=\"decimal\" aria-label=\"Point 8 indicator\" autocomplete=\"off\"><\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <span class=\"vbm215-hint\">Enter at least three complete pairs. Times must be finite, non-negative and distinct; order may be arbitrary. Blank rows are ignored. This three-point minimum is a mathematical UI rule, not an ISO adequacy criterion.<\/span>\n          <\/div>\n\n          <fieldset class=\"vbm215-fieldset\"><legend>Required projection confirmation<\/legend>\n            <label class=\"vbm215-check\"><input type=\"checkbox\" id=\"vbm215-c1\"><span>The indicator, unit, threshold and all measurements represent the same quantity, processing convention and measurement location.<\/span><\/label>\n            <label class=\"vbm215-check\"><input type=\"checkbox\" id=\"vbm215-c2\"><span>The operating regime and degradation mechanism are sufficiently stable for a straight-line screening projection over the declared horizon.<\/span><\/label>\n            <label class=\"vbm215-check\"><input type=\"checkbox\" id=\"vbm215-c3\"><span>I will not treat R\u00b2 as confidence, probability of failure, prediction uncertainty or proof that extrapolation is valid.<\/span><\/label>\n          <\/fieldset>\n        <\/div>\n        <div class=\"vbm215-actions\"><button class=\"vbm215-btn\" type=\"submit\">Project documented linear trend<\/button><button class=\"vbm215-btn secondary\" type=\"button\" id=\"vbm215-reset\">Clear<\/button><\/div>\n        <div class=\"vbm215-error\" id=\"vbm215-error\" role=\"alert\" tabindex=\"-1\"><\/div>\n      <\/form>\n    <\/div>\n  <\/section>\n\n  <section class=\"vbm215-card vbm215-results\" id=\"vbm215-results\" aria-live=\"polite\">\n    <div class=\"vbm215-card-h\"><h2>Reference projection result<\/h2><p id=\"vbm215-result-context\"><\/p><\/div>\n    <div class=\"vbm215-body\">\n      <div class=\"vbm215-result-grid\">\n        <div class=\"vbm215-result primary\"><div class=\"vbm215-result-label\">Projected remaining span \u0394t<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-remaining\">\u2014<\/div><div class=\"vbm215-result-note\">Straight-line threshold projection, not certified RUL.<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Projected crossing coordinate tL<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-cross\">\u2014<\/div><div class=\"vbm215-result-note\" id=\"vbm215-r-last\">\u2014<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Fitted slope b<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-slope\">\u2014<\/div><div class=\"vbm215-result-note\" id=\"vbm215-r-intercept\">\u2014<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Descriptive R\u00b2<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-r2\">\u2014<\/div><div class=\"vbm215-result-note\">In-sample fit statistic only; not confidence.<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Residual standard error s<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-rse\">\u2014<\/div><div class=\"vbm215-result-note\">\u221a[\u03a3(yi\u2212\u0177i)\u00b2\/(n\u22122)] in indicator units.<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Extrapolation\/baseline ratio<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-ratio\">\u2014<\/div><div class=\"vbm215-result-note\" id=\"vbm215-r-horizon\">\u2014<\/div><\/div>\n        <div class=\"vbm215-result\"><div class=\"vbm215-result-label\">Directional-step conflicts<\/div><div class=\"vbm215-result-value\" id=\"vbm215-r-conflicts\">\u2014<\/div><div class=\"vbm215-result-note\">Observed adjacent steps opposing the selected direction.<\/div><\/div>\n      <\/div>\n      <div class=\"vbm215-pass\">No confidence level, prediction interval, failure probability, ISO conformity, universal threshold or maintenance\/safety verdict is produced.<\/div>\n    <\/div>\n  <\/section>\n\n  <section class=\"vbm215-section\">\n    <h2>Equations, status and model boundary<\/h2>\n    <p>For n \u2265 3 complete observations and the straight-line model \u0177(t)=a+bt, ordinary unweighted least squares gives:<\/p>\n    <div class=\"vbm215-equation\">b = \u03a3[(ti\u2212t\u0304)(yi\u2212\u0233)] \/ \u03a3[(ti\u2212t\u0304)\u00b2] \u00b7 a = \u0233\u2212bt\u0304<\/div>\n    <div class=\"vbm215-equation\">tL = (L\u2212a)\/b \u00b7 \u0394t = tL\u2212tlast \u00b7 s = \u221a{\u03a3[yi\u2212\u0177(ti)]\u00b2\/(n\u22122)}<\/div>\n    <p>The calculation uses an analytical crossing, not a stepped search. It reports a result only when the fitted slope points toward a threshold beyond the last observation, the crossing lies in the future, and the remaining span does not exceed the user-declared horizon.<\/p>\n    <p><strong>R\u00b2 is descriptive.<\/strong> It summarizes in-sample lack of fit relative to variation around the sample mean. It is not a confidence percentage, probability of correct prediction, prediction interval, model-validation result or evidence that the mechanism will remain linear outside the data.<\/p>\n\n    <h3>Exact numerical checks<\/h3>\n    <div class=\"vbm215-table-wrap\"><table><thead><tr><th>Data and control<\/th><th>Fit<\/th><th>Projection<\/th><\/tr><\/thead><tbody>\n      <tr><td>(0,1),(1,3),(2,5); upper L=9; horizon=10<\/td><td>\u0177=1+2t; R\u00b2=1; s=0<\/td><td>tL=4; \u0394t=2<\/td><\/tr>\n      <tr><td>(0,10),(2,8),(4,6); lower L=2; horizon=10<\/td><td>\u0177=10\u2212t; R\u00b2=1; s=0<\/td><td>tL=8; \u0394t=4<\/td><\/tr>\n    <\/tbody><\/table><\/div>\n\n    <h3>Standard and source classification<\/h3>\n    <div class=\"vbm215-table-wrap\"><table><thead><tr><th>Claim<\/th><th>Classification<\/th><th>Inspected source<\/th><\/tr><\/thead><tbody>\n      <tr><td>Prognosis-process guidance and requirements<\/td><td>Current ISO framework; no regression equation inferred from public scope<\/td><td>ISO 13381-1:2025, edition 3, published 2025-09<\/td><\/tr>\n      <tr><td>ISO 13381-1:2015 status<\/td><td>Withdrawn 2025-09-02 and revised by the 2025 edition<\/td><td>Official ISO lifecycle card<\/td><\/tr>\n      <tr><td>Straight-line parameter fitting by minimizing squared residuals<\/td><td>General statistical method, not an ISO 13381 formula<\/td><td>NIST\/SEMATECH e-Handbook \u00a74.1.4.1 and \u00a74.4.3.1<\/td><\/tr>\n      <tr><td>R\u00b2 interpretation<\/td><td>Descriptive in-sample statistic; no confidence mapping<\/td><td>NIST\/SEMATECH glossary and process-model limitations<\/td><\/tr>\n    <\/tbody><\/table><\/div>\n    <p class=\"vbm215-source\"><a href=\"https:\/\/www.iso.org\/standard\/88029.html\" target=\"_blank\" rel=\"noopener\">ISO 13381-1:2025 official card<\/a> \u2014 current edition, status and public scope.<\/p>\n    <p class=\"vbm215-source\"><a href=\"https:\/\/www.iso.org\/standard\/51436.html\" target=\"_blank\" rel=\"noopener\">ISO 13381-1:2015 official lifecycle card<\/a> \u2014 withdrawn edition and replacement.<\/p>\n    <p class=\"vbm215-source\"><a href=\"https:\/\/www.itl.nist.gov\/div898\/handbook\/pmd\/section1\/pmd141.htm\" target=\"_blank\" rel=\"noopener\">NIST\/SEMATECH linear least-squares guidance<\/a> and <a href=\"https:\/\/www.itl.nist.gov\/div898\/handbook\/glossary.htm\" target=\"_blank\" rel=\"noopener\">R-squared glossary<\/a> \u2014 method and interpretation.<\/p>\n    <p><strong>Accessed:<\/strong> 15 July 2026. Only public ISO scope\/status information was used. No inaccessible ISO clause, formula, threshold or acceptance rule was invented.<\/p>\n    <div class=\"vbm215-limit\"><strong>Screening projection only.<\/strong> A defensible prognosis requires a validated degradation mechanism, representative data, measurement uncertainty, operating-regime controls, threshold provenance, model validation, uncertainty treatment and consequences-based engineering review. Outliers, autocorrelation, heteroscedasticity, interventions and regime changes can invalidate ordinary least-squares extrapolation.<\/div>\n  <\/section>\n\n  <footer class=\"vbm215-footer\">Revision: scientific audit 2026-07-15 \u00b7 English source page \u00b7 Straight-line reference only \u00b7 Preserve the complete input and source record with every result.<\/footer>\n<\/main>\n\n<script id=\"vbm-c100215-logic\">\n(function(){\n  'use strict';\n  function el(id){return document.getElementById(id)}\n  function value(id){return el(id).value}\n  function setText(id,text){el(id).textContent=text}\n  function clearError(){var box=el('vbm215-error');box.textContent='';box.classList.remove('show')}\n  function invalidate(){clearError();el('vbm215-results').classList.remove('show')}\n  function showError(err){invalidate();var box=el('vbm215-error');box.textContent=err&&err.message?err.message:String(err);box.classList.add('show');box.focus()}\n  function strictNumber(raw,label,positive){var s=String(raw==null?'':raw).trim();if(!s)throw new Error(label+' is required.');if(!\/^[+-]?(?:\\d+(?:[.,]\\d*)?|[.,]\\d+)$\/.test(s))throw new Error(label+' must be one complete decimal number.');var n=Number(s.replace(',','.'));if(!Number.isFinite(n)||(positive&&n<=0))throw new Error(label+(positive?' must be finite and greater than zero.':' must be finite.'));return n}\n  function finite(n,label){if(!Number.isFinite(n))throw new Error(label+' is outside the finite calculation range.');return n}\n  function project(x){\n    if(!x||!['increasing','decreasing'].includes(x.direction))throw new Error('Unsupported threshold direction.');\n    var L=strictNumber(x.threshold,'Documented threshold L',false),horizon=strictNumber(x.horizon,'Maximum projection span',true);\n    if(!Array.isArray(x.points)||x.points.length<3)throw new Error('Enter at least three complete data pairs.');\n    var p=x.points.map(function(q,i){return {t:strictNumber(q.t,'Point '+(i+1)+' time',false),y:strictNumber(q.y,'Point '+(i+1)+' indicator',false)}});\n    p.forEach(function(q){if(q.t<0)throw new Error('Time coordinates must be non-negative.')});\n    p.sort(function(a,b){return a.t-b.t});\n    for(var i=1;i<p.length;i++)if(p[i].t<=p[i-1].t)throw new Error('Time coordinates must be distinct.');\n    var n=p.length,tbar=0,ybar=0;for(i=0;i<n;i++){tbar+=p[i].t;ybar+=p[i].y}tbar\/=n;ybar\/=n;\n    var sxx=0,sxy=0;for(i=0;i<n;i++){var dt=p[i].t-tbar;sxx+=dt*dt;sxy+=dt*(p[i].y-ybar)}\n    finite(sxx,'Time variation');if(sxx<=0)throw new Error('Time coordinates do not provide a regression baseline.');\n    var b=finite(sxy\/sxx,'Fitted slope'),a=finite(ybar-b*tbar,'Fitted intercept');\n    if(x.direction==='increasing'&&b<=0)throw new Error('The fitted slope does not point toward an upper threshold.');\n    if(x.direction==='decreasing'&&b>=0)throw new Error('The fitted slope does not point toward a lower threshold.');\n    var first=p[0],last=p[n-1];\n    if(x.direction==='increasing'&&L<=last.y)throw new Error('The upper threshold must be beyond the last observed indicator value.');\n    if(x.direction==='decreasing'&&L>=last.y)throw new Error('The lower threshold must be beyond the last observed indicator value.');\n    var crossing=finite((L-a)\/b,'Projected crossing coordinate'),remaining=finite(crossing-last.t,'Projected remaining span');\n    if(remaining<=0)throw new Error('The fitted crossing is not in the future; no positive remaining span is reported.');\n    if(remaining>horizon)throw new Error('The fitted crossing lies beyond the declared projection horizon and is not reported.');\n    var sse=0,sst=0,conflicts=0;for(i=0;i<n;i++){var residual=p[i].y-(a+b*p[i].t);sse+=residual*residual;var dy=p[i].y-ybar;sst+=dy*dy;if(i&&((x.direction==='increasing'&&p[i].y<p[i-1].y)||(x.direction==='decreasing'&&p[i].y>p[i-1].y)))conflicts++}\n    sse=Math.max(0,finite(sse,'Residual sum of squares'));var r2=sst===0?null:finite(1-sse\/sst,'R squared'),rse=finite(Math.sqrt(sse\/(n-2)),'Residual standard error');\n    var baseline=finite(last.t-first.t,'Observed baseline'),ratio=finite(remaining\/baseline,'Extrapolation ratio');\n    return {direction:x.direction,L:L,horizon:horizon,points:p,n:n,a:a,b:b,crossing:crossing,remaining:remaining,last:last,baseline:baseline,ratio:ratio,sse:sse,sst:sst,r2:r2,rse:rse,conflicts:conflicts};\n  }\n  function read(){\n    ['vbm215-time-unit','vbm215-indicator','vbm215-indicator-unit','vbm215-threshold-source','vbm215-data-source','vbm215-regime','vbm215-use'].forEach(function(id){if(!value(id).trim())throw new Error(el(id).previousElementSibling.textContent.trim()+' is required.')});\n    ['vbm215-c1','vbm215-c2','vbm215-c3'].forEach(function(id){if(!el(id).checked)throw new Error('All projection confirmations are required.')});\n    var ts=document.querySelectorAll('.vbm215-t'),ys=document.querySelectorAll('.vbm215-y'),points=[];\n    for(var i=0;i<ts.length;i++){var t=ts[i].value.trim(),y=ys[i].value.trim();if(!t&&!y)continue;if(!t||!y)throw new Error('Point '+(i+1)+' must contain both time and indicator values.');points.push({t:t,y:y})}\n    return project({direction:value('vbm215-direction'),threshold:value('vbm215-threshold'),horizon:value('vbm215-horizon'),points:points});\n  }\n  function format(n){if(!Number.isFinite(n))return 'not defined';if(n===0)return '0';var a=Math.abs(n),s=(a>=1e9||a<1e-6)?n.toExponential(11):n.toPrecision(12);if(s.indexOf('e')>=0){var p=s.split('e');p[0]=p[0].replace(\/\\.?0+$\/,'');return p[0]+'e'+p[1].replace(\/^\\+\/,'')}return s.replace(\/\\.?0+$\/,'')}\n  function render(r){\n    var tu=value('vbm215-time-unit').trim(),iu=value('vbm215-indicator-unit').trim();\n    setText('vbm215-result-context',value('vbm215-indicator').trim()+' \u00b7 '+r.direction+' threshold \u00b7 '+value('vbm215-use').trim());\n    setText('vbm215-r-remaining',format(r.remaining)+' '+tu);setText('vbm215-r-cross',format(r.crossing)+' '+tu);setText('vbm215-r-last','last observation t = '+format(r.last.t)+' '+tu);\n    setText('vbm215-r-slope',format(r.b)+' '+iu+'\/'+tu);setText('vbm215-r-intercept','a = '+format(r.a)+' '+iu+' at t = 0');\n    setText('vbm215-r-r2',r.r2===null?'not defined':format(r.r2));setText('vbm215-r-rse',format(r.rse)+' '+iu);\n    setText('vbm215-r-ratio',format(r.ratio)+' \u00d7 observed baseline');setText('vbm215-r-horizon','\u0394t = '+format(r.remaining)+' '+tu+'; declared horizon = '+format(r.horizon)+' '+tu);\n    setText('vbm215-r-conflicts',r.conflicts+' of '+(r.n-1)+' adjacent steps');clearError();el('vbm215-results').classList.add('show');\n  }\n  var form=el('vbm215-form');\n  form.addEventListener('submit',function(e){e.preventDefault();try{render(read())}catch(err){showError(err)}});\n  form.addEventListener('keydown',function(e){if(e.key==='Enter'&&e.target&&e.target.tagName==='INPUT'){e.preventDefault();var btn=form.querySelector('button[type=\"submit\"]');if(typeof form.requestSubmit==='function')form.requestSubmit(btn);else btn.click()}});\n  form.querySelectorAll('input,select').forEach(function(x){x.addEventListener('input',invalidate);x.addEventListener('change',invalidate)});\n  el('vbm215-reset').addEventListener('click',function(){form.reset();form.querySelectorAll('input').forEach(function(x){if(x.type!=='checkbox')x.value=''});invalidate();el('vbm215-time-unit').focus()});\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Fit a documented straight-line least-squares trend and project a future threshold crossing within a declared horizon; not an ISO RUL or confidence calculator.<\/p>","protected":false},"featured_media":0,"template":"","meta":{"ai_generated_summary":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-100215","calculator","type-calculator","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/calculator\/100215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/calculator"}],"about":[{"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/types\/calculator"}],"version-history":[{"count":3,"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/calculator\/100215\/revisions"}],"predecessor-version":[{"id":102557,"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/calculator\/100215\/revisions\/102557"}],"wp:attachment":[{"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/media?parent=100215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/categories?post=100215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vibromera.eu\/hi\/wp-json\/wp\/v2\/tags?post=100215"}],"curies":[{"name":"\u0921\u092c\u094d\u0932\u094d\u092f\u0942\u092a\u0940","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}