Percentage Rate Base Calculator

.prb-calculator-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e0e0e0; border-radius: 12px; background-color: #f9f9f9; color: #333; box-shadow: 0 4px 6px rgba(0,0,0,0.05); } .prb-calculator-container h2 { color: #2c3e50; text-align: center; margin-bottom: 25px; } .calculator-box { background: #ffffff; padding: 20px; border-radius: 8px; border: 1px solid #ddd; } .input-group { margin-bottom: 15px; } .input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #444; } .input-group select, .input-group input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; font-size: 16px; } .btn-calculate { width: 100%; padding: 15px; background-color: #3498db; color: white; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .btn-calculate:hover { background-color: #2980b9; } .result-display { margin-top: 25px; padding: 20px; background-color: #e8f4fd; border-left: 5px solid #3498db; border-radius: 4px; display: none; } .result-display h3 { margin: 0 0 10px 0; color: #2c3e50; } .result-value { font-size: 24px; font-weight: bold; color: #2980b9; } .article-section { margin-top: 40px; line-height: 1.6; } .article-section h3 { color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 10px; } .formula-box { background: #f0f0f0; padding: 15px; border-radius: 6px; font-family: "Courier New", Courier, monospace; text-align: center; margin: 20px 0; } .example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; } .example-card { background: #fff; padding: 15px; border: 1px solid #eee; border-radius: 8px; }

Percentage, Rate, and Base Calculator

Find the Percentage (Part) Find the Rate (%) Find the Base (Whole)

Result:

Understanding the Percentage, Rate, and Base (PRB) Relationship

In mathematics, the relationship between a part, a whole, and a percentage is fundamental. This is often referred to as the PRB Triangle. Whether you are calculating sales tax, analyzing data trends, or solving school math problems, understanding these three components is essential.

P = R × B
Percentage (Part) = Rate (%) × Base (Total)
  • Base (B): The whole amount or the total value (100%).
  • Rate (R): The ratio or percent, usually followed by the % symbol. It represents how many parts per hundred are being considered.
  • Percentage (P): The specific part or portion of the base.

Real-World Examples

Finding the Percentage:

If you have 500 apples (Base) and 20% (Rate) of them are red, how many are red?

Calculation: 0.20 × 500 = 100 apples.

Finding the Rate:

If a student scores 45 points out of 60 (Base), what is the percentage score?

Calculation: (45 / 60) × 100 = 75%.

Finding the Base:

If $15 is 5% (Rate) of a total cost, what is the total cost?

Calculation: 15 / 0.05 = $300.

How to Use This Calculator

This tool allows you to solve for any missing variable in the PRB equation. Simply select the value you want to find from the dropdown menu, enter the two known values, and click calculate. The tool automatically converts percentages into decimals for accurate calculation and provides the step-by-step logic used to reach the answer.

function updateFields() { var mode = document.getElementById("calcMode").value; var label1 = document.getElementById("label1"); var label2 = document.getElementById("label2"); var val1 = document.getElementById("val1"); var val2 = document.getElementById("val2"); var resultDisplay = document.getElementById("resultDisplay"); resultDisplay.style.display = "none"; val1.value = ""; val2.value = ""; if (mode === "percentage") { label1.innerHTML = "Rate (%)"; label2.innerHTML = "Base (Total Amount)"; val1.placeholder = "e.g. 15"; val2.placeholder = "e.g. 200"; } else if (mode === "rate") { label1.innerHTML = "Percentage (The Part)"; label2.innerHTML = "Base (Total Amount)"; val1.placeholder = "e.g. 30"; val2.placeholder = "e.g. 150"; } else if (mode === "base") { label1.innerHTML = "Percentage (The Part)"; label2.innerHTML = "Rate (%)"; val1.placeholder = "e.g. 50"; val2.placeholder = "e.g. 25"; } } function calculatePRB() { var mode = document.getElementById("calcMode").value; var v1 = parseFloat(document.getElementById("val1").value); var v2 = parseFloat(document.getElementById("val2").value); var resVal = document.getElementById("resultValue"); var resTitle = document.getElementById("resultTitle"); var resForm = document.getElementById("resultFormula"); var resDisp = document.getElementById("resultDisplay"); if (isNaN(v1) || isNaN(v2)) { alert("Please enter valid numeric values in both fields."); return; } var result = 0; var formulaText = ""; if (mode === "percentage") { // P = (R/100) * B result = (v1 / 100) * v2; resTitle.innerHTML = "Percentage (The Part):"; resVal.innerHTML = result.toLocaleString(undefined, {maximumFractionDigits: 4}); formulaText = "Formula: (" + v1 + " / 100) × " + v2 + " = " + result; } else if (mode === "rate") { // R = (P / B) * 100 if (v2 === 0) { alert("Base cannot be zero when calculating Rate."); return; } result = (v1 / v2) * 100; resTitle.innerHTML = "Rate (Percentage):"; resVal.innerHTML = result.toLocaleString(undefined, {maximumFractionDigits: 4}) + "%"; formulaText = "Formula: (" + v1 + " / " + v2 + ") × 100 = " + result + "%"; } else if (mode === "base") { // B = P / (R/100) if (v2 === 0) { alert("Rate cannot be zero when calculating Base."); return; } result = v1 / (v2 / 100); resTitle.innerHTML = "Base (Total Amount):"; resVal.innerHTML = result.toLocaleString(undefined, {maximumFractionDigits: 4}); formulaText = "Formula: " + v1 + " / (" + v2 + " / 100) = " + result; } resForm.innerHTML = formulaText; resDisp.style.display = "block"; }

Leave a Comment