{"id":12959,"date":"2025-05-29T13:17:40","date_gmt":"2025-05-29T13:17:40","guid":{"rendered":"https:\/\/slxtest.wpengine.com\/calcolatore-del-roi\/"},"modified":"2026-01-26T15:41:07","modified_gmt":"2026-01-26T15:41:07","slug":"calcolatore-del-roi","status":"publish","type":"page","link":"https:\/\/shoplogix.com\/it\/calcolatore-del-roi\/","title":{"rendered":"Calcolatore del ROI"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"12959\" class=\"elementor elementor-12959 elementor-9381\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d06a720 e-flex e-con-boxed e-con e-parent\" data-id=\"d06a720\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9420f7a elementor-widget elementor-widget-heading\" data-id=\"9420f7a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Calcolatore del ROI<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1e0d5fb elementor-widget elementor-widget-html\" data-id=\"1e0d5fb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t <style>\r\n        .input-row { margin-bottom: 1em; }\r\n        label { display: block; font-weight: bold; margin-bottom: .2em;}\r\n        input { width: 100%; padding: .5em; font-size: 1em; }\r\n        button { padding: 1em 2em; font-size: 1em; border: none; border-radius: 4px; background: #1071e5; color: #fff; cursor: pointer;}\r\n        .result { margin-top: 2em; }\r\n        .breakdown { margin-top: 1em; }\r\n        .bar { height: 18px; border-radius: 9px; background: #eee; margin-bottom: 8px; overflow: hidden;}\r\n        .bar-inner { height: 100%; text-align: right; color: #fff; font-weight: bold; padding-right: .5em;}\r\n      <\/style>\r\n      <div class=\"box\">\r\n        <div class=\"input-row\">\r\n          <label>Numero di linee<\/label>\r\n          <input id=\"lines\" type=\"number\" min=\"1\" value=\"1\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Tariffa oraria ($\/ora)<\/label>\r\n          <input id=\"hourlyRate\" type=\"number\" min=\"1\" value=\"50\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Tempo di inattivit\u00e0 non pianificato al giorno (minuti)<\/label>\r\n          <input id=\"downtime\" type=\"number\" min=\"0\" value=\"60\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>% di scarto<\/label>\r\n          <input id=\"scrapPercent\" type=\"number\" min=\"0\" max=\"100\" value=\"5\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Costo dello scarto per unit\u00e0 ($)<\/label>\r\n          <input id=\"scrapCost\" type=\"number\" min=\"0\" value=\"2\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Tempo di cambio a settimana (minuti)<\/label>\r\n          <input id=\"changeover\" type=\"number\" min=\"0\" value=\"120\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Produzione media settimanale (unit\u00e0)<\/label>\r\n          <input id=\"weeklyProd\" type=\"number\" min=\"1\" value=\"10000\">\r\n        <\/div>\r\n        <div class=\"input-row\">\r\n          <label>Costo per riga ($) <small>(adattare secondo necessit\u00e0)<\/small><\/label>\r\n          <input id=\"costPerLine\" type=\"number\" min=\"1\" value=\"30000\">\r\n        <\/div>\r\n        <button onclick=\"calculateROI()\">Calcola il ROI<\/button>\r\n    \r\n        <div class=\"result\" id=\"result\" style=\"display:none;\">\r\n          <h3>Risultati<\/h3>\r\n          <div><strong>Risparmio netto annualizzato:<\/strong> $<span id=\"annualSavings\"><\/span><\/div>\r\n          <div><strong>Ritorno sull'investimento:<\/strong><span id=\"roi\"><\/span> %<\/div>\r\n          <div><strong>Periodo di ammortamento:<\/strong><span id=\"payback\"><\/span> anni<\/div>\r\n          <div><strong>TIR (3 anni):<\/strong><span id=\"irr\"><\/span> %<\/div>\r\n          <div class=\"breakdown\">\r\n            <h4>Ripartizione dei risparmi<\/h4>\r\n            <div>Risparmio sui tempi di inattivit\u00e0: $<span id=\"downSavings\"><\/span><\/div>\r\n            <div class=\"bar\"><div id=\"bar1\" class=\"bar-inner\" style=\"background:#2196f3;\"><\/div><\/div>\r\n            <div>Risparmio sugli scarti: $<span id=\"scrapSavings\"><\/span><\/div>\r\n            <div class=\"bar\"><div id=\"bar2\" class=\"bar-inner\" style=\"background:#4caf50;\"><\/div><\/div>\r\n            <div>Risparmio sul cambio: $<span id=\"changeSavings\"><\/span><\/div>\r\n            <div class=\"bar\"><div id=\"bar3\" class=\"bar-inner\" style=\"background:#ff9800;\"><\/div><\/div>\r\n          <\/div>\r\n        <\/div>\r\n      <\/div>\r\n      <script>\r\n        \/\/ IRR calculation using Newton's method, 3 years\r\n        function calcIRR(values) {\r\n          let guess = 0.1;\r\n          for (let iter=0; iter<100; iter++) {\r\n            let npv=0, dnpv=0;\r\n            for (let t=0; t<values.length; t++) {\r\n              npv += values[t] \/ Math.pow(1+guess, t);\r\n              if (t>0) dnpv -= t*values[t]\/Math.pow(1+guess,t+1);\r\n            }\r\n            let newGuess = guess - npv\/dnpv;\r\n            if (Math.abs(newGuess-guess) < 1e-7) return (guess*100).toFixed(2);\r\n            guess = newGuess;\r\n          }\r\n          return (guess*100).toFixed(2);\r\n        }\r\n    \r\n        function calculateROI() {\r\n          \/\/ Gather inputs\r\n          let lines = +document.getElementById('lines').value;\r\n          let hourlyRate = +document.getElementById('hourlyRate').value;\r\n          let downtime = +document.getElementById('downtime').value;\r\n          let scrapPercent = +document.getElementById('scrapPercent').value \/ 100;\r\n          let scrapCost = +document.getElementById('scrapCost').value;\r\n          let changeover = +document.getElementById('changeover').value;\r\n          let weeklyProd = +document.getElementById('weeklyProd').value;\r\n          let costPerLine = +document.getElementById('costPerLine').value;\r\n    \r\n          \/\/ Investment calculation\r\n          let investment = lines * costPerLine;\r\n    \r\n          \/\/ Savings calculations (edit reduction rates as needed!)\r\n          \/\/ Downtime savings = downtime mins\/day * 365 * $\/hr \/ 60 * reduction * lines\r\n          let downtimeSavings = downtime * 365 * hourlyRate \/ 60 * 0.3 * lines;\r\n          \/\/ Scrap savings = weekly prod * 52 * scrap% * scrapCost * reduction\r\n          let scrapSavings = weeklyProd * 52 * scrapPercent * scrapCost * 0.2;\r\n          \/\/ Changeover savings = changeover mins\/week * 52 * $\/hr \/ 60 * reduction * lines\r\n          let changeSavings = changeover * 52 * hourlyRate \/ 60 * 0.15 * lines;\r\n    \r\n          let annualSavings = downtimeSavings + scrapSavings + changeSavings;\r\n    \r\n          \/\/ ROI (%)\r\n          let roi = investment > 0 ? (annualSavings \/ investment * 100) : 0;\r\n          \/\/ Payback (years)\r\n          let payback = annualSavings > 0 ? (investment \/ annualSavings) : 0;\r\n    \r\n          \/\/ IRR (3yr) = internal rate of return for cash flows [-investment, +annual, +annual, +annual]\r\n          let irr = calcIRR([-investment, annualSavings, annualSavings, annualSavings]);\r\n    \r\n          \/\/ Show results\r\n          document.getElementById('annualSavings').textContent = annualSavings.toLocaleString(undefined, {maximumFractionDigits: 0});\r\n          document.getElementById('roi').textContent = roi.toFixed(2);\r\n          document.getElementById('payback').textContent = payback.toFixed(2);\r\n          document.getElementById('irr').textContent = irr;\r\n    \r\n          \/\/ Breakdown\r\n          document.getElementById('downSavings').textContent = downtimeSavings.toLocaleString(undefined, {maximumFractionDigits: 0});\r\n          document.getElementById('scrapSavings').textContent = scrapSavings.toLocaleString(undefined, {maximumFractionDigits: 0});\r\n          document.getElementById('changeSavings').textContent = changeSavings.toLocaleString(undefined, {maximumFractionDigits: 0});\r\n    \r\n          \/\/ Bar chart (percent of total)\r\n          let dPct = downtimeSavings \/ annualSavings * 100;\r\n          let sPct = scrapSavings \/ annualSavings * 100;\r\n          let cPct = changeSavings \/ annualSavings * 100;\r\n          document.getElementById('bar1').style.width = dPct + '%';\r\n          document.getElementById('bar1').textContent = dPct > 15 ? dPct.toFixed(1)+'%' : '';\r\n          document.getElementById('bar2').style.width = sPct + '%';\r\n          document.getElementById('bar2').textContent = sPct > 15 ? sPct.toFixed(1)+'%' : '';\r\n          document.getElementById('bar3').style.width = cPct + '%';\r\n          document.getElementById('bar3').textContent = cPct > 15 ? cPct.toFixed(1)+'%' : '';\r\n    \r\n          document.getElementById('result').style.display = 'block';\r\n        }\r\n      <\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Calcolatore del ROI Numero di linee Tariffa oraria ($\/ora) Tempo di inattivit\u00e0 non pianificato al giorno (minuti) % di scarto Costo dello scarto per unit\u00e0 ($) Tempo di cambio a settimana (minuti) Produzione media settimanale (unit\u00e0) Costo per riga ($) (adattare secondo necessit\u00e0) Calcola il ROI Risultati Risparmio netto annualizzato: $ Ritorno sull&#8217;investimento: % Periodo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":158,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-12959","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/pages\/12959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/comments?post=12959"}],"version-history":[{"count":0,"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/pages\/12959\/revisions"}],"wp:attachment":[{"href":"https:\/\/shoplogix.com\/it\/wp-json\/wp\/v2\/media?parent=12959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}