# Refractometer Calculators: AG Calculators for Refractometers

## AG Fluid Refractive Index and °Brix Calculator// <![CDATA[ old browsers can't handle JavaScript functions so comment them out function calculateRIAG(x, y) // ' x= AG Fluid / °Brix at 20.0°C // ' y= Temperature t / °C { var ri = 1.33420625557548 + x * (1.47859310012558E-03 + x * (6.57915526656913E-06 + x * (1.7883199551242E-08))) + y * (-3.66630391505478E-05 + y * (-1.06842461660223E-06 + y * (-7.40895420848983E-09))) + x * y * (-2.84515337867906E-06 + y * (1.66304105711204E-08) + x * (-6.04649838605149E-08)); return ri; } function calculateBrixRI(ri) { var brix = -32287.4988560507 + (82120.1412685194 * ri) + (-79143.7844583759 * Math.pow(ri,2)) + (34231.1074823289 * Math.pow(ri,3)) + (-5583.34191442644 * Math.pow(ri,4)); return brix.toFixed(2); } function checkValidityAG(batch, temperature, form) // Is it a valid batch code? { batch = trimAll(batch); batch = batch.toUpperCase(); // Check for valid batch and temperature switch(batch){ case "AG2.5": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(2.5, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG5": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(5, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG7.5": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(7.5, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG10": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(10, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG11.2": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(11.2, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG12": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(12, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG12.5": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(12.5, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG15": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(15, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; case "AG40": if (checkTemperature(10, 40, temperature)) { var ri = calculateRIAG(40, temperature); form.RI.value = ri.toFixed(5); form.Brix.value = calculateBrixRI(ri); } else { form.RI.value = ""; form.Brix.value = ""; } break; default: form.RI.value = ""; form.Brix.value = ""; } } function checkTemperature(minTemp, maxTemp, formTemp) // Is it a valid number between minTemp & maxTemp? { if(!isNaN(formTemp) && (formTemp >= minTemp && formTemp <= maxTemp)) { tempValid = true; } else { tempValid = false; } return tempValid; } function trimAll(sString) { while (sString.substring(0,1) == ' ') { sString = sString.substring(1, sString.length); } while (sString.substring(sString.length-1, sString.length) == ' ') { sString = sString.substring(0,sString.length-1); } return sString; } // end of JavaScript functions // ]]> Javascript is not enabled in this browser.

Refractive Index values are calculated from a data fit of empirical results, which are valid over the range 10 to 40°C. The values used to determine this relationship were produced from a statistical evaluation of averaged refractive index data measured on a high accuracy refractometer at 589.3nm. °Brix values are equivalent scale values in accordance with the relationship between Refractive Index and °Brix published by ICUMSA. Refractive Index and °Brix values will only be displayed if the temperature is within the stated range.

Note: Results derived from these calculations at any temperature other than 20.0°C are outside the scope of Bellingham + Stanley Ltd.'s UKAS Calibration Accreditation.
 Fluid Type AG2.5 AG5 AG7.5 AG10 AG11.2 AG12 AG12.5 AG15 AG40 Temperature °C Refractive Index °Brix

### Looking for more refractometer calculators?

If this isn’t the refractometer calculator you’re looking for, then please visit our calculator hub which offers a range of calculators for refractometers, including a very useful ABV calculator for brewers. It is also possible to look up other internationally recognised standards should be working under other inspection bodies or accreditations to UKAS. Click here to visit the calculator hub