Calculating the corrosion rate is essential for predicting the lifespan of industrial equipment, pipelines, and structural components. This calculator uses the standard weight loss method (ASTM G31) to determine how fast a specific metal is deteriorating in a given environment.
The Corrosion Rate Formula
The standard formula used to calculate corrosion rate from weight loss is:
CR = (K × W) / (A × T × D)
Where:
CR: Corrosion Rate
K: Constant defining the units (3.45 × 10⁶ for mpy)
W: Weight loss in grams (Initial Weight – Final Weight)
A: Surface area in cm²
T: Time of exposure in hours
D: Density of the material in g/cm³
How to Create a Corrosion Rate Calculator in Excel
While our web tool gives immediate results, many engineers prefer to track data over time in Microsoft Excel. Here is how you can set up your own calculator spreadsheet:
Setup Headers: Label cells A1 through E1 as: Initial Weight (g), Final Weight (g), Area (cm²), Time (hours), and Density (g/cm³).
Input Data: Enter your measured values in Row 2 (A2 through E2).
Apply the Formula (for mpy): In cell F2, paste the following logic:
=(3450000 * (A2 – B2)) / (C2 * D2 * E2)
Breakdown of the Excel Calculation:
A2-B2 calculates the total weight loss ($W$).
3450000 is the $K$ factor to convert the result into Mils Per Year (mpy).
If you want Millimeters Per Year (mm/y), replace the K constant with 87600.
Interpreting Your Results
Once you have your calculation, how do you know if the rate is acceptable? Use this general guideline for carbon steel systems:
Mpy (Mils Per Year) is the industry standard in the United States and oil & gas sectors. One mil equals one-thousandth of an inch (0.001″). It provides a convenient integer scale for most industrial corrosion problems.
Does density affect the calculation?
Yes. A lighter metal (like Aluminum) losing 1 gram of weight has lost more volume than a heavy metal (like Gold) losing 1 gram. Since corrosion is a volumetric loss (thinning), density is required to convert weight loss into thickness loss.
What is the K factor for mm/year?
If you wish to calculate Millimeters Per Year directly, the K constant is 8.76 x 10⁴ (or 87,600). Our calculator above provides both mpy and mm/y automatically.
function toggleDensityList() {
var list = document.getElementById("densityList");
if (list.style.display === "block") {
list.style.display = "none";
} else {
list.style.display = "block";
}
}
function calculateCorrosion() {
// Get input values
var wInit = parseFloat(document.getElementById("initialWeight").value);
var wFinal = parseFloat(document.getElementById("finalWeight").value);
var time = parseFloat(document.getElementById("exposureTime").value);
var area = parseFloat(document.getElementById("surfaceArea").value);
var density = parseFloat(document.getElementById("density").value);
// Validation
if (isNaN(wInit) || isNaN(wFinal) || isNaN(time) || isNaN(area) || isNaN(density)) {
alert("Please fill in all fields with valid numbers.");
return;
}
if (time <= 0 || area <= 0 || density wInit) {
alert("Final weight cannot be greater than initial weight. This indicates mass gain, not corrosion.");
return;
}
// Calculate Weight Loss
var weightLoss = wInit – wFinal;
// Constants (ASTM G31)
var k_mpy = 3.45 * Math.pow(10, 6); // Constant for Mils Per Year
var k_mmy = 8.76 * Math.pow(10, 4); // Constant for Millimeters Per Year
// Calculate Rates
// Formula: (K * W) / (A * T * D)
var denominator = area * time * density;
var mpy = (k_mpy * weightLoss) / denominator;
var mmy = (k_mmy * weightLoss) / denominator;
// Display Results
document.getElementById("resWeightLoss").innerHTML = weightLoss.toFixed(4) + " g";
document.getElementById("resMpy").innerHTML = mpy.toFixed(2) + " mpy";
document.getElementById("resMmpy").innerHTML = mmy.toFixed(3) + " mm/y";
// Show result container
document.getElementById("results").className = "results-area active";
}