Calcolatore costi di produzione.Production cost calculator.

Quanto costa produrre un raccordo industriale? Uno strumento che lo stima prima di produrlo — e mostra da dove viene ogni euro.How much does an industrial pipe fitting cost to make? A tool that estimates it before production — and shows where every euro comes from.

annoyear
2026
ruolorole
Tesi triennale · modello di costo e applicazioneBachelor thesis · cost model & application
statostatus
Demo con dati simulatiDemo with simulated data
stack
Excel · HTML/CSS/JS · Chart.js · Cost accounting
Il numero finale è facile. Capire da dove viene è il vero lavoro.The final number is easy. Understanding where it comes from is the real work.

Tesi di laurea svolta con un'azienda che produce raccordi per tubazioni industriali. Ho costruito un calcolatore che stima a preventivo il costo unitario di ogni articolo: in Excel le voci di budget diventano tariffe orarie delle macchine; un'applicazione web le applica al ciclo del singolo pezzo, insieme a materia prima, lavorazioni esterne e certificazioni. Ogni euro del risultato si può ricondurre al dato che l'ha generato.A thesis carried out with a company that makes fittings for industrial piping. I built a calculator that estimates the unit production cost of each item up front: in Excel, budget items become hourly machine rates; a web application applies them to each part's routing, together with raw material, outsourced operations and certifications. Every euro of the result can be traced back to the data behind it.

// la tesi, in 8 passi — tocca tutto · tutti i numeri sono dimostrativi, come nella tesi// the thesis, in 8 steps — touch everything · all numbers are illustrative, as in the thesis

// 01 — il problema// 01 — the problem

Un costo che vive nella testa di qualcunoA cost that lives in someone's head

In un'azienda che produce centinaia di raccordi diversi, la stima del costo si appoggia all'esperienza. Funziona, finché qualcuno chiede «da dove viene questo numero?»: se i criteri restano impliciti è difficile confrontare due stime e aggiornarle. E una media per famiglia nasconde proprio le differenze che contano. Prova a confrontare.In a company that makes hundreds of different fittings, cost estimates lean on experience. That works — until someone asks "where does this number come from?": when criteria stay implicit, two estimates are hard to compare and to update. And a family average hides exactly the differences that matter. Try comparing.

media vs articolovalori dimostrativiillustrative values

// 02 — il prodotto e il ciclo// 02 — the product and its cycle

Ogni raccordo fa la sua stradaEvery fitting takes its own route

Curve, tee e riduzioni nascono da un tubo tagliato in sbozzati, poi deformato a freddo, trattato in forno, finito e controllato. Lo stabilimento è lo stesso, il percorso no: alcune fasi si ripetono, come pressatura e forno in una riduzione molto marcata. Il ciclo è la base su cui il costo viene attribuito. Scegli un raccordo.Elbows, tees and reducers all start from a tube cut into blanks, then cold-formed, heat-treated, finished and checked. Same plant, different route: some phases repeat, like pressing and furnace in a steep reducer. The cycle is what cost gets attributed to. Pick a fitting.

ciclo produttivosemplificatosimplified
fase che può ripetersi nel ciclophase that can repeat in the cycle

Sequenze semplificate a scopo illustrativo: non riproducono i cicli aziendali, né tempi o parametri.Simplified sequences for illustration: they don't reproduce company cycles, timings or parameters.

// 03 — dal budget alla tariffa oraria// 03 — from budget to hourly rate

Ogni macchina ha un prezzo all'oraEvery machine has a price per hour

È il cuore economico del lavoro, costruito in Excel. Le voci annuali dell'azienda — personale, energia, consumabili, affitto, leasing, ammortamenti, spese generali — vengono assegnate alle macchine con criteri diversi e trasformate in euro all'ora sulle ore previste a preventivo (H = giorni × ore). Così una pressa e un forno costano diversamente per ragioni che si possono leggere. Scegli una macchina e regola quanto serve l'operatore.This is the economic core of the work, built in Excel. The company's yearly cost items — staff, energy, consumables, rent, leasing, depreciation, overheads — are assigned to machines with different criteria and turned into euros per hour over the planned hours (H = days × hours). So a press and a furnace cost differently for reasons you can read. Pick a machine and set how much operator time it needs.

tariffa orariavalori dimostrativiillustrative values
risorsaresource
presenza operatoreoperator presence α0,50
tariffarate
€ 40,00/h
corario = manodoperalabour (coperatore × α) + Σ quote orarie della macchinamachine hourly shares
// 04 — dal codice al costo// 04 — from code to cost

Un articolo, dal codice ai 22 euroOne item, from code to 22 euros

Le tariffe passano all'applicazione (HTML + JavaScript), che le applica al singolo articolo collegando le anagrafiche: cicli, risorse, materiali, prezzi dei tubi, listini esterni, aliquote. È l'esempio della tesi, un passaggio alla volta. Guarda lo scontrino riempirsi.The rates move into the application (HTML + JavaScript), which applies them to a single item by linking the master data: cycles, resources, materials, tube prices, supplier price lists, rates. This is the thesis example, one step at a time. Watch the receipt fill up.

calcolo guidatoesempio della tesi · dati dimostrativithesis example · illustrative data
costo unitariounit cost
DM145LR1MS40S
LavorazioniProcessing€ 6,00
Materia primaRaw material€ 10,00
Taglio esternoExternal cut€ 4,00
CertificazioniCertifications€ 2,00
TotaleTotal€ 0,00
// 05 — risalire alle cause// 05 — tracing the causes

Muovi una leva, vedi chi l'ha mossaMove a lever, see what moved it

Il valore vero dello strumento è poter risalire dal totale alle componenti, e dalle componenti ai dati. Qui lo stesso articolo diventa un banco di prova: prova gli scenari della tesi — il tubo che rincara del 10%, il forno che costa il 20% in più per il gas — o muovi tu le leve.The tool's real value is being able to trace back from the total to its components, and from components to the data. Here the same item becomes a test bench: try the thesis scenarios — tube price up 10%, furnace 20% dearer because of gas — or move the levers yourself.

sandboxvalori dimostrativiillustrative values
FasePhase TariffaRate ProduttivitàOutput €/pz
Prezzo tuboTube price€ 50,00/m
Sbozzato per pezzoBlank per piece0,20 m
Taglio esterno (da listino)External cut (price list)€ 4,00
Aliquota certificazioniCertification rate10 %
costo unitariounit cost
€ 22,00
45%materia primaraw material
LavorazioniProcessing
Materia primaRaw material
Taglio esternoExternal cut
CertificazioniCertifications

Attenzione a cosa significa il numero. Se una macchina produce più pezzi all'ora, il costo attribuito al pezzo scende — ma l'azienda continua a pagare affitto, leasing e stipendi. Ridurre il costo unitario non vuol dire ridurre di altrettanto la spesa: vuol dire liberare tempo per altre produzioni.Mind what the number means. If a machine makes more pieces per hour, the cost attributed to each piece goes down — but the company still pays rent, leases and salaries. Lowering unit cost doesn't cut spending by the same amount: it frees up time for other production.

// 06 — quando i dati non sono perfetti// 06 — when the data isn't perfect

Tre regole per i casi realiThree rules for real cases

L'esempio di prima è pulito. Le anagrafiche vere no: ci sono alternative di lavorazione, fasi ripetute, dati mancanti. Il calcolatore li distingue con regole esplicite e lo dice all'utente, invece di nasconderlo nel totale.The example above is clean. Real master data isn't: there are processing alternatives, repeated phases, missing data. The calculator tells them apart with explicit rules — and tells the user, instead of burying it in the total.

// alternativealternatives

Stesso numero di fase? È un'alternativaSame phase number? It's an alternative

Se due righe hanno lo stesso numero di fase, se ne conta una sola: di default la più costosa, prudente. L'utente può cambiarla.If two rows share a phase number, only one counts: by default the most expensive, to stay prudent. The user can switch it.

costo del ciclocycle cost€ 6,00
// fasi ripetuterepeated phases

Una fase ripetuta si conta due volteA repeated phase counts twice

Un secondo passaggio in forno è un costo vero: ha un numero di fase distinto e viene sommato. La numerazione separa ciò che è alternativo da ciò che è aggiuntivo.A second furnace pass is a real cost: it gets a distinct phase number and is added. Numbering separates what's alternative from what's additional.

30 · FornoFurnace€ 2,00
50 · FornoFurnace€ 2,00
contate entrambeboth counted€ 4,00
// dati mancantimissing data

Zero non vuol dire gratisZero doesn't mean free

Una risorsa o un prezzo non trovati producono un importo nullo che non è un costo assente. Il calcolatore lo segnala, così come segnala quando usa una misura alternativa del listino.A resource or price that can't be found yields a zero that isn't a missing cost. The calculator flags it — just as it flags when it falls back to an alternative price-list size.

40 · Risorsa 9Resource 9€ 0,00 ⚠
risorsa non trovata: da verificareresource not found: check it
// 07 — fuori gamma, con l'AI// 07 — off-range, with AI

Una richiesta che non era nei datiA request that wasn't in the data

Un cliente extraeuropeo, codifiche e norme diverse: nessun articolo corrispondente in anagrafica. Le mie regole di codifica e le logiche del calcolatore sono state date come contesto a un sistema di AI, per trovare articoli di riferimento — tra cui un'alternativa con spessore maggiore. Il costo è rimasto calcolato dalle regole; la verifica, dalle persone.An overseas customer, different codes and standards: no matching item in the master data. My coding rules and the calculator's logic were given as context to an AI system to find reference items — including a thicker-walled alternative. Cost stayed computed by the rules; checking stayed with people.

caso applicativo
inputinput

Richiesta fuori gammaOff-range request

Convenzioni dimensionali e specifiche diverse da quelle abituali.Sizing conventions and specs unlike the usual ones.

AI

Cerca corrispondenzeSearches for matches

Con le regole di codifica come contesto, scompone la richiesta e la confronta con gli articoli noti.With the coding rules as context, it breaks the request down and compares it with known items.

personepeople

Scelgono il riferimentoPick the reference

Verificano compatibilità tecnica e quali componenti di costo tenere o aggiornare.They check technical fit and which cost components to keep or update.

regolerules

Calcolano il costoCompute the cost

Nuovo tubo → nuova materia prima; ciclo simile → da verificare. Stesso motore, stesse formule.New tube → new raw material; similar cycle → to be checked. Same engine, same formulas.

output

Stima + valutazioniEstimate + judgement

Gli scarti attesi per specifiche più severe vengono aggiunti a parte, non in automatico.Expected scrap from stricter specs is added separately, not automatically.

L'AI cerca.AI searches. Le regole calcolano.Rules compute. Le persone verificano.People verify.

// limiti, detti chiaramentelimits, stated plainly

  • Vale quanto i dati: un prezzo vecchio o un ciclo incompleto danno un risultato corretto nella forma ma sbagliato nella sostanza.Only as good as the data: an old price or an incomplete cycle gives a result that's formally right but practically wrong.
  • Produttività medie: non separano il tempo di lavorazione da quello di attrezzaggio — un'ipotesi da verificare quando cambiano i lotti.Average output rates: they don't separate run time from set-up time — an assumption to check when batch sizes change.
  • Scarti e sfridi non sono nel modello: vanno valutati a parte.Scrap and offcuts aren't in the model: they're assessed separately.
  • Ripartizioni convenzionali: le spese comuni sono divise in parti uguali, una scelta semplice e aggiornabile, non una misura.Conventional allocation: shared costs are split equally — simple and updatable, not a measurement.

// dove può andarewhere it can go

  • Stime contro consuntivi: confrontare sistematicamente il costo stimato con quello reale, per trovare gli scostamenti.Estimates vs actuals: systematically compare estimated and actual cost to find the gaps.
  • Collegamento al gestionale: prezzi, cicli e anagrafiche aggiornati senza passaggi manuali.ERP integration: prices, cycles and master data updated without manual steps.
  • Archivio delle offerte, dove l'AI aiuta a ritrovare i casi simili — distinguendo ciò che è confermato da ciò che è ancora un'ipotesi.An archive of quotes, where AI helps find similar cases — separating what's confirmed from what's still a hypothesis.
// 08 — la macchina vera// 08 — the real machine

Adesso provala per davveroNow try the real thing

Questa è l'applicazione, in versione dimostrativa: cerca un codice e guarda il costo scomporsi voce per voce, con le fasi e il grafico. Nomi, codici e numeri sono interamente simulati.This is the application, in a demo version: search a code and watch the cost break down item by item, with phases and chart. Names, codes and numbers are fully simulated.

// calcolatore-costi · demo Apri il calcolatoreOpen the calculator Si apre a schermo intero in una nuova scheda. Prova un codice, ad esempio DM190LR4S10S.Opens fullscreen in a new tab. Try a code, e.g. DM190LR4S10S.
prossimo progettonext project → COO Agent System.COO Agent System.