Part Rate and Base Calculator

.prb-calculator-container { max-width: 800px; margin: 20px auto; padding: 25px; background-color: #ffffff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #333; line-height: 1.6; } .prb-calculator-container h2 { color: #2c3e50; text-align: center; margin-bottom: 25px; } .calculator-section { background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 25px; border: 1px solid #e9ecef; } .input-group { margin-bottom: 15px; } .input-group label { display: block; font-weight: 600; margin-bottom: 5px; color: #495057; } .input-group input, .input-group select { width: 100%; padding: 10px; border: 1px solid #ced4da; border-radius: 5px; font-size: 16px; box-sizing: border-box; } .calc-btn { background-color: #007bff; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; width: 100%; font-size: 16px; font-weight: bold; transition: background-color 0.2s; } .calc-btn:hover { background-color: #0056b3; } .result-display { margin-top: 20px; padding: 15px; background-color: #e7f3ff; border-left: 5px solid #007bff; border-radius: 4px; display: none; } .result-display strong { font-size: 1.2em; color: #004085; } .article-content { margin-top: 30px; } .article-content h3 { color: #2c3e50; border-bottom: 2px solid #007bff; padding-bottom: 5px; } .example-box { background-color: #fff8e1; border-left: 5px solid #ffc107; padding: 15px; margin: 15px 0; }

Part, Rate, and Base Calculator

Find Part (P = B × R) Find Rate (R = P / B) Find Base (B = P / R)

Understanding the Percentage Formula: Part, Rate, and Base

The relationship between the Part, Rate, and Base is the foundation of all percentage calculations. Whether you are calculating taxes, discounts, or statistical proportions, you are using this fundamental triad.

  • Base (B): The entire amount or the whole value. It represents 100%.
  • Rate (R): The percentage or ratio. Usually expressed as a percentage (e.g., 15%).
  • Part (P): The portion or segment of the base that corresponds to the rate.

The Formulas

Depending on which value is unknown, you can rearrange the primary formula Part = Base × Rate:

  1. To find the Part: Base × (Rate / 100)
  2. To find the Rate: (Part / Base) × 100
  3. To find the Base: Part / (Rate / 100)
Example 1: Finding the Part
If you have a Base of 200 items and the Rate is 10%, what is the Part?
Calculation: 200 × 0.10 = 20. The Part is 20.
Example 2: Finding the Rate
If 50 people (Part) out of 250 (Base) attended an event, what was the attendance Rate?
Calculation: (50 / 250) × 100 = 20%. The Rate is 20%.

When to Use This Calculator

This tool is essential for students, business professionals, and educators. It helps in determining commissions, grading exams, analyzing growth rates, and verifying discount amounts without the risk of manual arithmetic errors.

function updateInputs() { var type = document.getElementById("calculationType").value; var l1 = document.getElementById("label1"); var l2 = document.getElementById("label2"); var v1 = document.getElementById("val1"); var v2 = document.getElementById("val2"); // Reset values and hide result when changing mode v1.value = ""; v2.value = ""; document.getElementById("resultDisplay").style.display = "none"; if (type === "part") { l1.innerText = "Base (The Whole)"; l2.innerText = "Rate (Percentage %)"; v1.placeholder = "e.g. 500"; v2.placeholder = "e.g. 20"; } else if (type === "rate") { l1.innerText = "Part (The Portion)"; l2.innerText = "Base (The Whole)"; v1.placeholder = "e.g. 100"; v2.placeholder = "e.g. 500"; } else if (type === "base") { l1.innerText = "Part (The Portion)"; l2.innerText = "Rate (Percentage %)"; v1.placeholder = "e.g. 100"; v2.placeholder = "e.g. 20"; } } function calculatePRB() { var type = document.getElementById("calculationType").value; var v1 = parseFloat(document.getElementById("val1").value); var v2 = parseFloat(document.getElementById("val2").value); var resultText = document.getElementById("resultText"); var resultDisplay = document.getElementById("resultDisplay"); if (isNaN(v1) || isNaN(v2)) { alert("Please enter valid numeric values in both fields."); return; } var finalResult = 0; var message = ""; if (type === "part") { // P = B * (R/100) finalResult = v1 * (v2 / 100); message = "The Part is: " + finalResult.toLocaleString(undefined, {maximumFractionDigits: 4}) + ""; } else if (type === "rate") { // R = (P / B) * 100 if (v2 === 0) { alert("Base cannot be zero."); return; } finalResult = (v1 / v2) * 100; message = "The Rate is: " + finalResult.toLocaleString(undefined, {maximumFractionDigits: 4}) + "%"; } else if (type === "base") { // B = P / (R/100) if (v2 === 0) { alert("Rate cannot be zero."); return; } finalResult = v1 / (v2 / 100); message = "The Base is: " + finalResult.toLocaleString(undefined, {maximumFractionDigits: 4}) + ""; } resultText.innerHTML = message; resultDisplay.style.display = "block"; }

Leave a Comment