Glomerular Filtration Rate (GFR) is a key indicator of kidney function. It measures how much blood passes through the glomeruli each minute. The glomeruli are tiny filters in your kidneys that remove waste products from your blood. A lower GFR can indicate kidney damage or disease. This calculator uses the CKD-EPI 2021 creatinine equation, which is a widely accepted formula for estimating GFR.
Male
Female
White
Black or African American
Asian
Other
Estimated GFR:
#gfr-calculator {
font-family: sans-serif;
max-width: 500px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
background-color: #f9f9f9;
}
.input-section {
margin-bottom: 15px;
}
.input-section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #333;
}
.input-section input[type="number"],
.input-section select {
width: calc(100% – 12px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
display: block;
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
}
button:hover {
background-color: #45a049;
}
.result-section {
margin-top: 20px;
padding: 15px;
background-color: #e8f5e9;
border: 1px solid #a5d6a7;
border-radius: 4px;
}
.result-section h3 {
margin-top: 0;
color: #2e7d32;
}
#gfrValue {
font-size: 24px;
font-weight: bold;
color: #1b5e20;
}
#gfrInterpretation {
font-style: italic;
color: #555;
margin-top: 5px;
}
function calculateGFR() {
var serumCreatinine = parseFloat(document.getElementById("serumCreatinine").value);
var age = parseInt(document.getElementById("age").value);
var gender = document.getElementById("gender").value;
var race = document.getElementById("race").value;
var gfr = 0;
var coefficient = 0;
var genderFactor = 1;
var raceFactor = 1;
if (isNaN(serumCreatinine) || isNaN(age) || serumCreatinine <= 0 || age <= 0) {
document.getElementById("gfrValue").innerText = "Invalid input";
document.getElementById("gfrInterpretation").innerText = "";
return;
}
// CKD-EPI 2021 creatinine equation
if (gender === "male") {
genderFactor = 1.012;
} else {
genderFactor = 0.995;
}
if (race === "black") {
raceFactor = 1.141;
} else if (race === "asian") {
raceFactor = 0.923;
} else { // White, Other
raceFactor = 1.0;
}
// Determine coefficient based on serum creatinine level
if (serumCreatinine 0.7 && serumCreatinine 1.0 && serumCreatinine 1.5 && serumCreatinine 2.0 && serumCreatinine 3.5
coefficient = -0.029;
}
gfr = Math.pow(141 * Math.min(serumCreatinine / {SC_ADJUST}, 1) + coefficient * Math.min(serumCreatinine / {SC_ADJUST}, 0), 0.489) *
Math.pow(Math.max(serumCreatinine / {SC_ADJUST}, 1), -0.329) *
Math.pow(0.993, age) * genderFactor * raceFactor;
// For females, adjust SC_ADJUST based on age and race (CKD-EPI 2021 does not use SC_ADJUST, it is implicit)
// The equation uses SC for serum creatinine directly. The `SC_ADJUST` is an internal variable for the equation.
// For males, SC_ADJUST = 1.0; for females, SC_ADJUST = 0.7
var SC_ADJUST = (gender === "male") ? 1.0 : 0.7;
gfr = Math.pow(141 * Math.min(serumCreatinine / SC_ADJUST, 1) + coefficient * Math.min(serumCreatinine / SC_ADJUST, 0), 0.489) *
Math.pow(Math.max(serumCreatinine / SC_ADJUST, 1), -0.329) *
Math.pow(0.993, age) * genderFactor * raceFactor;
document.getElementById("gfrValue").innerText = gfr.toFixed(2) + " mL/min/1.73m²";
var interpretation = "";
if (gfr = 15 && gfr = 30 && gfr = 60 && gfr < 90) {
interpretation = "Mild kidney disease or normal";
} else {
interpretation = "Normal kidney function";
}
document.getElementById("gfrInterpretation").innerText = "Interpretation: " + interpretation;
}