# Calcolatore ricette birra: ingredienti, quantità e tempi

Mastro Birraio - Homebrew Calculator
    
    
    
        // Disabilita il preflight globale di Tailwind per NON rompere il tema di WordPress
        tailwind.config = {
            corePlugins: { preflight: false }
        }
    
    
        /* Reset isolato solo per il calcolatore (sostituisce il preflight di Tailwind) */
        #homebrew-app *, #homebrew-app ::before, #homebrew-app ::after {
            box-sizing: border-box;
            border-width: 0;
            border-style: solid;
            border-color: #e5e7eb;
        }
        #homebrew-app h1, #homebrew-app h2, #homebrew-app h3, #homebrew-app p, #homebrew-app ul {
            margin: 0;
            padding: 0;
        }
        #homebrew-app ul { list-style: none; }
        #homebrew-app button { background-color: transparent; cursor: pointer; }
        #homebrew-app input, #homebrew-app select { margin: 0; font-family: inherit; }
        
        /* Stili personalizzati per i tooltip e l'integrazione */
        .tooltip-container {
            position: relative;
            display: inline-flex;
            align-items: center;
            cursor: help;
        }
        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            width: 250px;
            background-color: #1f2937;
            color: #fff;
            text-align: left;
            border-radius: 6px;
            padding: 10px;
            position: absolute;
            z-index: 50;
            bottom: 125%;
            left: 50%;
            margin-left: -125px;
            font-size: 0.875rem;
            line-height: 1.4;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transition: opacity 0.3s;
            font-weight: normal;
        }
        .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #1f2937 transparent transparent transparent;
        }
        .tooltip-container:hover .tooltip-text,
        .tooltip-container:focus-within .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        /* Tema Colori Birra */
        .bg-beer-light { background-color: #fef3c7; } /* Amber 100 */
        .text-beer-dark { color: #92400e; } /* Amber 800 */
        .border-beer { border-color: #f59e0b; } /* Amber 500 */
        
        /* Stili per la stampa (Nasconde input e formatta per PDF/Carta) */
        @media print {
            body { background: white !important; }
            .no-print { display: none !important; }
            .print-full { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; border: none !important; }
            .shadow-lg { box-shadow: none !important; border: 1px solid #ccc; }
            .grid { display: block !important; }
            .card-print { margin-bottom: 20px; page-break-inside: avoid; }
        }
    

    
 
    {
      "@context": "https://schema.org",
      "@graph": [
        {
          "@type": "SoftwareApplication",
          "name": "Mastro Birraio Pro - Homebrew Calculator",
          "url": "https://www.iltuosito.it/url-della-pagina",
          "description": "Risolutore matematico e calcolatore avanzato per homebrewer. Calcola l'estrazione degli zuccheri (OG/FG), l'amaro (IBU con formula Tinseth), il grado alcolico (ABV) e i volumi esatti dell'acqua di ammostamento e sparge.",
          "applicationCategory": "UtilityApplication",
          "applicationSubCategory": "Calculator",
          "operatingSystem": "All",
          "browserRequirements": "Requires JavaScript",
          "softwareVersion": "1.0",
          "offers": {
            "@type": "Offer",
            "price": "0",
            "priceCurrency": "EUR",
            "availability": "https://schema.org/InStock"
          },
          "featureList": [
            "Risoluzione equazioni di estrazione malto",
            "Calcolo IBU (International Bitterness Units)",
            "Stima ABV (Alcohol By Volume)",
            "Calcolo volumi acqua e assorbimento grani"
          ],
          "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "4.8",
            "ratingCount": "124"
          }
        },
        {
          "@type": ["MathSolver", "LearningResource"],
          "name": "Risolutore Matematico Birra",
          "url": "https://www.lacasettacraftbeercrew.it/calcolatore-ricette-birra/",
          "usageInfo": "https://www.lacasettacraftbeercrew.it/calcolatore-ricette-birra/",
          "description": "Strumento per risolvere equazioni chimico-fisiche legate alla produzione di birra artigianale (efficienza estrazione, diluizione, calcolo IBU).",
          "eduQuestionType": [
            "Equation solving",
            "Math word problem"
          ],
          "potentialAction": {
            "@type": "SolveMathAction",
            "target": "https://www.lacasettacraftbeercrew.it/calcolatore-ricette-birra/"
          }
        }
      ]
    }
    

    
    
    
        
            

            Mastro Birraio Pro
        
        

Calcolatore avanzato di ricette, volumi e procedure per Homebrewing
    

    
    
        
            
            
            
                
                    Stile della Birra
                    ?
                    Seleziona lo stile di birra. Il software adatterà automaticamente ingredienti, percentuali, IBU e procedure di ammostamento in base alle linee guida mondiali BJCP.
                
                
                    
                
            

            
            
                
                    Litri Desiderati in Fermentatore (L)
                    ?
                    La quantità esatta di mosto freddo che vuoi ottenere a fine bollitura per essere trasferita nel fermentatore. Di solito 20 o 23 litri per i kit standard.
                
                
            

            
            
                
                    Efficienza dell'Impianto (%)
                    ?
                    La percentuale di zuccheri estratti dai grani. Per i principianti (BIAB o pentole standard) il 70% è un valore realistico. Impianti avanzati raggiungono il 75-80%.
                
                
            
            
        
        
        
            

            
                

                Stampa Ricetta
            
        
    

    
    
        
        
        
            

## 🎯 Parametri Obiettivo

            

                
                    OG (Densità Iniziale)
                        Original Gravity. Misura la quantità di zuccheri nel mosto prima della fermentazione. Indica il potenziale alcolico.
                    
                    1.000
                
                
                    FG (Densità Finale)
                        Final Gravity. La densità dopo che il lievito ha consumato gli zuccheri fermentabili.
                    
                    1.000
                
                
                    ABV (Grado Alcolico)
                        Alcohol By Volume. Percentuale di alcol stimata nella birra finita. (OG - FG) * 131.25
                    
                    0.0%
                
                
                    IBU (Amarezza)
                        International Bitterness Units. Misura il grado di amaro conferito dai luppoli. Più è alto, più la birra è amara.
                    
                    0
                
                
                    Colore stimato
                    Chiara
                
            

        

        
        
            
                💧 Volumi Acqua
                
                    Info calcolo?
                    L'acqua totale considera l'assorbimento dei grani (1 L/kg), l'evaporazione in bollitura (~3 L/h) e la perdita nel fondo pentola (trub, ~2L).
                
            
            

                
                    
                        Acqua di Mash (Ammostamento)L'acqua necessaria per mettere in infusione i grani. Rapporto standard: 3 litri per ogni kg di malto.
                        0 L
                    
                    
                
                
                    
                        Acqua di Sparge (Risciacquo)Acqua calda (78°C) usata per sciacquare i grani a fine ammostamento e recuperare gli zuccheri residui.
                        0 L
                    
                    
                
                
                    
                        Acqua Totale Necessaria
                        0 L
                    
                    
                        Volume in bollitura (Pre-boil): **0 L**
                    
                
            

        

        
        
            

## 🦠 Lievito e Fermentazione

            
                Ceppo Consigliato
                **Nome Lievito**
            
            
                
                    Temperatura
                    --°C
                
                
                    Durata stimata
                    -- gg
                
            
            

                * Assicurati di inoculare il lievito solo quando il mosto è sceso alla temperatura indicata. Usa 1 bustina (11g) fino a 23L (densità < 1.060), altrimenti 2 bustine.
            
        

        
        
            
                

## 🌾 Malti (Grain Bill)

                Totale: 0 kg
            
            
            
                
                    
                        
                            Ingrediente
                            Percentuale
                            Quantità (kg)
                        
                    
                    
                        
                    
                
            
        

        
        
            
                🌿 Luppoli
                    I luppoli aggiunti a inizio bollitura (60 min) danno amaro. Quelli aggiunti alla fine (15-0 min) danno sapore e aroma. Il Dry Hop si fa nel fermentatore a freddo.
                
                0 IBU
            
            
            

                
            

        

        
        
            

## 📋 Procedura Standard (Step-by-Step)

            
            
                
                
                    
                    

### 1. Ammostamento

                    

Riscalda l'acqua di Mash a **65°C** (aggiungi i grani a +2°C per compensare il calo termico).
                    
                        Sosta per 60 minuti.
                    
                

                
                
                    
                    

### 2. Lavaggio e Bollitura

                    

Effettua lo sparge con acqua a 78°C. Porta il mosto raccolto a ebollizione vigorosa.
                    
                        Bollitura totale: 60 minuti.
                        Aggiungi i luppoli seguendo esattamente i tempi della tabella 'Luppoli'. Il tempo indica i minuti rimanenti alla fine della bollitura.
                    
                

                
                
                    
                    

### 3. Raffreddamento

                    

Spegni il fuoco. Usa una serpentina per raffreddare il mosto il più velocemente possibile.
                    
                        Raffredda fino a 20°C. Trasferisci nel fermentatore ossigenando bene.
                    
                

                
                
                    
                    

### 4. Fermentazione

                    

Inocula il lievito. Chiudi il fermentatore e inserisci il gorgogliatore.
                    
                        Mantieni 20°C per circa 14 giorni o fino a FG stabile.
                    
                
            
        

    

    // --- DATABASE STILI DI BIRRA (Basato su linee guida BJCP e chimica reale) ---
    const beerStyles = {
        ipa: {
            name: "American IPA",
            desc: "Birra chiara, marcatamente amara e luppolata. Esplosione di aromi agrumati, resinosi e frutti tropicali tipici dei luppoli americani.",
            colorDesc: "Dorato intenso / Ambrato chiaro",
            og: 1.062, fg: 1.012, ibu: 60,
            grains: [
                { name: "Malto Pale Ale (Base)", pct: 0.85 },
                { name: "Malto Monaco", pct: 0.08 },
                { name: "Carapils (Schiuma/Corpo)", pct: 0.05 },
                { name: "Crystal 60L", pct: 0.02 }
            ],
            hops: [
                { name: "Magnum", time: 60, pctIbu: 0.50, aa: 14, isDryHop: false },
                { name: "Citra", time: 15, pctIbu: 0.25, aa: 12, isDryHop: false },
                { name: "Mosaic", time: 5, pctIbu: 0.25, aa: 12, isDryHop: false },
                { name: "Citra + Mosaic (Dry Hop)", time: 0, pctIbu: 0, aa: 0, isDryHop: true, gPerL: 5 } // 5 grammi/litro in fermentazione
            ],
            yeast: { name: "Fermentis US-05 o Wyeast 1056", temp: 19, time: 14 },
            procedure: { mashTemp: 65, mashTime: 60 }
        },
        stout: {
            name: "Dry Irish Stout",
            desc: "Scura, secca e tostata. Simile alla Guinness. Note spiccate di caffè freddo e cioccolato amaro con schiuma cremosa.",
            colorDesc: "Nero impenetrabile",
            og: 1.044, fg: 1.010, ibu: 35,
            grains: [
                { name: "Maris Otter (Base)", pct: 0.70 },
                { name: "Fiocchi d'Orzo (Flaked Barley)", pct: 0.20 },
                { name: "Orzo Tostato (Roasted Barley)", pct: 0.10 }
            ],
            hops: [
                { name: "East Kent Goldings (EKG)", time: 60, pctIbu: 1.0, aa: 5, isDryHop: false }
            ],
            yeast: { name: "Fermentis S-04 o Wyeast 1084 (Irish Ale)", temp: 18, time: 10 },
            procedure: { mashTemp: 67, mashTime: 60 } // Più alto per dare corpo
        },
        weiss: {
            name: "German Weissbier",
            desc: "Birra di frumento tedesca, torbida e dissetante. Profilo aromatico dominato da banana ed esteri speziati (chiodi di garofano).",
            colorDesc: "Giallo paglierino torbido",
            og: 1.050, fg: 1.012, ibu: 14,
            grains: [
                { name: "Malto di Frumento (Wheat)", pct: 0.55 },
                { name: "Malto Pilsner", pct: 0.45 }
            ],
            hops: [
                { name: "Hallertau Mittelfrüh", time: 60, pctIbu: 1.0, aa: 4, isDryHop: false }
            ],
            yeast: { name: "Fermentis WB-06 o WLP300", temp: 20, time: 12 },
            procedure: { mashTemp: 66, mashTime: 60 }
        },
        pilsner: {
            name: "Bohemian Pilsner",
            desc: "Lager chiara ceca per eccellenza. Fresca, con un netto ma morbido amaro floreale/speziato donato dal luppolo Saaz.",
            colorDesc: "Dorato brillante",
            og: 1.050, fg: 1.012, ibu: 35,
            grains: [
                { name: "Malto Pilsner (Base)", pct: 0.95 },
                { name: "Carapils", pct: 0.05 }
            ],
            hops: [
                { name: "Saaz", time: 60, pctIbu: 0.50, aa: 3.5, isDryHop: false },
                { name: "Saaz", time: 30, pctIbu: 0.35, aa: 3.5, isDryHop: false },
                { name: "Saaz", time: 10, pctIbu: 0.15, aa: 3.5, isDryHop: false }
            ],
            yeast: { name: "Fermentis W-34/70 o Wyeast 2124 (Lager)", temp: 11, time: 28 }, // Lagerizzazione!
            procedure: { mashTemp: 65, mashTime: 60 } // Single infusion per semplicità
        },
        dubbel: {
            name: "Belgian Dubbel",
            desc: "Scura trappista belga. Ricca, maltata, con note di caramello scuro, frutta rossa disidratata e leggero speziato dal lievito.",
            colorDesc: "Marrone ramato",
            og: 1.065, fg: 1.014, ibu: 20,
            grains: [
                { name: "Malto Pilsner", pct: 0.65 },
                { name: "Malto Monaco", pct: 0.15 },
                { name: "Special B", pct: 0.05 },
                { name: "CaraMunich", pct: 0.05 },
                { name: "Zucchero Candito Scuro (Boil 10 min)", pct: 0.10 } // Zucchero calcolato a parte, semplificato in kg totali
            ],
            hops: [
                { name: "Styrian Goldings", time: 60, pctIbu: 0.80, aa: 4.5, isDryHop: false },
                { name: "Saaz", time: 15, pctIbu: 0.20, aa: 3.5, isDryHop: false }
            ],
            yeast: { name: "Fermentis BE-256 o Wyeast 1214 (Abbey)", temp: 21, time: 15 },
            procedure: { mashTemp: 64, mashTime: 60 }
        }
    };

    // --- VARIABILI GLOBALI E COSTANTI FISICHE ---
    const CONSTANTS = {
        grainPotential: 300, // Punti di gravità per kg in 1 litro (L°/kg) medi per malto base
        waterMashRatio: 3, // Litri d'acqua per kg di malto in ammostamento
        grainAbsorption: 1, // Litri d'acqua assorbiti da 1 kg di malto
        boilOffRate: 3.5, // Litri persi per evaporazione in 1 ora di bollitura
        trubLoss: 2 // Litri persi nel fondo della pentola e tubi
    };

    // --- INIZIALIZZAZIONE DOM ---
    document.addEventListener("DOMContentLoaded", () => {
        const styleSelect = document.getElementById("beer-style");
        
        // Popola la select
        for (const [key, data] of Object.entries(beerStyles)) {
            const option = document.createElement("option");
            option.value = key;
            option.textContent = data.name;
            styleSelect.appendChild(option);
        }

        // Event Listeners
        const inputs = ['beer-style', 'batch-volume', 'efficiency'];
        inputs.forEach(id => {
            document.getElementById(id).addEventListener('input', calculateRecipe);
        });

        // Primo calcolo
        calculateRecipe();
    });

    // --- MOTORE DI CALCOLO ---
    function calculateRecipe() {
        const styleKey = document.getElementById("beer-style").value;
        const volumeLiters = parseFloat(document.getElementById("batch-volume").value) || 20;
        const efficiencyPct = parseFloat(document.getElementById("efficiency").value) || 70;
        
        const style = beerStyles[styleKey];
        const effDec = efficiencyPct / 100;

        // 1. Aggiorna UI base dello stile
        document.getElementById("style-description").textContent = style.desc;
        document.getElementById("out-og").textContent = style.og.toFixed(3);
        document.getElementById("out-fg").textContent = style.fg.toFixed(3);
        document.getElementById("out-color").textContent = style.colorDesc;
        
        const abv = ((style.og - style.fg) * 131.25);
        document.getElementById("out-abv").textContent = abv.toFixed(1) + "%";
        document.getElementById("out-ibu").textContent = style.ibu;

        // 2. Calcolo dei Malti (Grani)
        // Formula punti gravitazionali: (OG - 1) * 1000 * Volume
        const gravityPoints = (style.og - 1) * 1000;
        const totalPointsNeeded = gravityPoints * volumeLiters;
        
        // kg totali = Punti Totali / (Potenziale Malto * Efficienza)
        const totalGrainKg = totalPointsNeeded / (CONSTANTS.grainPotential * effDec);
        document.getElementById("out-grain-total").textContent = totalGrainKg.toFixed(2);

        const grainList = document.getElementById("grain-list");
        grainList.innerHTML = ''; // Reset
        
        style.grains.forEach(grain => {
            const weight = (totalGrainKg * grain.pct).toFixed(2);
            const row = `
                
                    ${grain.name}
                    ${(grain.pct * 100).toFixed(0)}%
                    ${weight}
                
            `;
            grainList.innerHTML += row;
        });

        // 3. Calcolo Acqua
        const mashWater = totalGrainKg * CONSTANTS.waterMashRatio;
        const grainAbsorbed = totalGrainKg * CONSTANTS.grainAbsorption;
        const preBoilVolume = volumeLiters + CONSTANTS.trubLoss + CONSTANTS.boilOffRate;
        const spargeWater = preBoilVolume - mashWater + grainAbsorbed;
        const totalWater = mashWater + spargeWater;

        document.getElementById("out-water-mash").textContent = mashWater.toFixed(1) + " L";
        document.getElementById("out-water-sparge").textContent = spargeWater.toFixed(1) + " L";
        document.getElementById("out-water-total").textContent = totalWater.toFixed(1) + " L";
        document.getElementById("out-water-preboil").textContent = preBoilVolume.toFixed(1) + " L";

        // 4. Calcolo Luppoli (Simplified Tinseth/Garetz approximation per l'UI)
        const hopList = document.getElementById("hop-list");
        hopList.innerHTML = ''; // Reset
        let checkIbu = 0;

        style.hops.forEach(hop => {
            let weightGrams = 0;
            let timeText = "";
            let badgeColor = "";

            if (hop.isDryHop) {
                // Calcolo per Dry Hop (grammi * volume finale)
                weightGrams = hop.gPerL * volumeLiters;
                timeText = "A freddo (Fermentatore)";
                badgeColor = "bg-purple-100 text-purple-800";
            } else {
                // Calcolo in base all'IBU richiesto
                const targetIbuForHop = style.ibu * hop.pctIbu;
                // Fattore di utilizzo empirico approssimato per la calcolatrice
                // 60 min -> ~25%, 30 min -> ~15%, 15 min -> ~10%, 5 min -> ~5%
                let utilization = 0;
                if (hop.time >= 60) utilization = 0.25;
                else if (hop.time >= 30) utilization = 0.17;
                else if (hop.time >= 15) utilization = 0.12;
                else if (hop.time >= 5) utilization = 0.05;
                else utilization = 0.01; // Flameout (appena spento)

                // Grammi = (IBU * Volume) / (Utilizzazione * AlphaAcidi * 10)
                weightGrams = (targetIbuForHop * preBoilVolume) / (utilization * hop.aa * 10);
                timeText = `${hop.time} min`;
                
                if (hop.time >= 45) badgeColor = "bg-red-100 text-red-800"; // Amaro
                else if (hop.time >= 15) badgeColor = "bg-orange-100 text-orange-800"; // Sapore
                else badgeColor = "bg-green-100 text-green-800"; // Aroma

                checkIbu += targetIbuForHop;
            }

            const li = `
                
                    
                        **${hop.name} (${hop.aa || 0}% AA)**
                        ${timeText}
                    
                    
                        ${weightGrams.toFixed(1)} g
                        ${hop.isDryHop ? '' : `~${(style.ibu * hop.pctIbu).toFixed(0)} IBU`}
                    
                
            `;
            hopList.innerHTML += li;
        });
        document.getElementById("out-ibu-check").textContent = Math.round(checkIbu) || style.ibu; // Fallback to target if all dry hop

        // 5. Lievito e Procedure
        document.getElementById("out-yeast-name").textContent = style.yeast.name;
        document.getElementById("out-yeast-temp").textContent = style.yeast.temp + "°C";
        document.getElementById("out-yeast-time").textContent = style.yeast.time + " gg";

        document.getElementById("proc-mash-temp").textContent = style.procedure.mashTemp;
        document.getElementById("proc-mash-time").textContent = style.procedure.mashTime;
        document.getElementById("proc-cool-temp").textContent = style.yeast.temp;
        document.getElementById("proc-ferm-temp").textContent = style.yeast.temp;
        document.getElementById("proc-ferm-time").textContent = style.yeast.time;
    }