Calculate Long-Term (LT) corrosion rates and estimate remaining equipment life (API 510/570 logic).
Measurement at baseline (mm or in)
Latest measurement (mm or in)
Years between measurements
Retirement limit (Tmin)
Thickness Loss:0.00
Corrosion Rate:0.00 units/year
Remaining Corrosion Allowance:0.00
Estimated Remaining Life:0.0 Years
Status:—
Understanding Corrosion Rate & Remaining Life
In industrial maintenance, specifically for piping (API 570) and pressure vessels (API 510), calculating the corrosion rate is critical for ensuring safety and compliance. This calculator helps reliability engineers and inspectors determine how fast a material is degrading and how long it can safely remain in service.
The Logic Behind the Calculation
The calculation is based on the rate of metal loss over a specific time period. The fundamental formulas used are:
Corrosion Rate (CR): The speed at which the material thickness is decreasing.
CR = (Initial Thickness - Current Thickness) / Time Elapsed
Remaining Corrosion Allowance (RCA): The amount of metal available for corrosion before the equipment becomes unsafe.
RCA = Current Thickness - Minimum Required Thickness
Remaining Life (RL): The estimated time until the equipment reaches its retirement limit.
RL = RCA / Corrosion Rate
How to Use This Calculator
Initial Thickness: Enter the thickness reading from a previous inspection or the nominal thickness at installation.
Current Thickness: Enter the most recent ultrasonic thickness (UT) reading.
Time Interval: Enter the number of years between the Initial and Current measurements.
Minimum Required Thickness (Tmin): Enter the absolute minimum thickness required for the equipment to handle its design pressure and temperature.
Interpreting the Results
If your Remaining Life is less than your inspection interval (typically 5 or 10 years), you must schedule maintenance, repair, or replacement immediately. A negative Remaining Life indicates the equipment is already below its minimum safety threshold and is non-compliant.
Note: This calculator assumes a linear corrosion rate (Long Term Corrosion Rate). If process conditions have changed, the Short Term Corrosion Rate should also be evaluated.
function calculateCorrosion() {
// Get input values using var
var tInitial = parseFloat(document.getElementById('initialThickness').value);
var tCurrent = parseFloat(document.getElementById('currentThickness').value);
var timeYears = parseFloat(document.getElementById('yearsService').value);
var tMin = parseFloat(document.getElementById('minThickness').value);
// Validation
if (isNaN(tInitial) || isNaN(tCurrent) || isNaN(timeYears) || isNaN(tMin)) {
alert("Please fill in all fields with valid numbers.");
return;
}
if (timeYears 0) {
remainingLife = remainingAllowance / corrosionRate;
} else if (corrosionRate <= 0) {
// No corrosion or growth (unlikely but possible measurement error or scaling)
remainingLife = 999; // Representing indefinite
}
// Display Logic
var resultContainer = document.getElementById('results');
var lossDisplay = document.getElementById('lossResult');
var rateDisplay = document.getElementById('rateResult');
var allowanceDisplay = document.getElementById('allowanceResult');
var lifeDisplay = document.getElementById('lifeResult');
var statusDisplay = document.getElementById('statusResult');
// Show result box
resultContainer.style.display = "block";
// Set Values
lossDisplay.innerHTML = thicknessLoss.toFixed(3);
if (corrosionRate <= 0) {
rateDisplay.innerHTML = "Negligible / No Loss";
} else {
rateDisplay.innerHTML = corrosionRate.toFixed(3) + " / year";
}
allowanceDisplay.innerHTML = remainingAllowance.toFixed(3);
// Status Logic
var statusHtml = "";
if (remainingAllowance < 0) {
// Already failed
lifeDisplay.innerHTML = "0.0 Years";
statusHtml = "CRITICAL: Below T-min! Replace Immediately.";
} else if (corrosionRate <= 0) {
lifeDisplay.innerHTML = "Indefinite";
statusHtml = "Stable Condition";
} else {
lifeDisplay.innerHTML = remainingLife.toFixed(1) + " Years";
if (remainingLife < 5) {
statusHtml = "Critical Priority (Less than 5 years)";
} else if (remainingLife < 10) {
statusHtml = "Warning (Monitor Closely)";
} else {
statusHtml = "Safe Operation";
}
}
statusDisplay.innerHTML = statusHtml;
}