body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.calculator-wrapper {
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 30px;
margin-bottom: 40px;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.calc-header {
text-align: center;
margin-bottom: 25px;
}
.calc-header h2 {
margin: 0;
color: #2c3e50;
}
.input-group {
margin-bottom: 20px;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #444;
}
.input-group input {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
transition: border-color 0.3s;
}
.input-group input:focus {
border-color: #3498db;
outline: none;
}
.help-text {
font-size: 0.85em;
color: #777;
margin-top: 5px;
}
.calc-btn {
display: block;
width: 100%;
background-color: #3498db;
color: white;
border: none;
padding: 15px;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
.calc-btn:hover {
background-color: #2980b9;
}
.results-area {
margin-top: 30px;
background-color: white;
border: 1px solid #eee;
border-radius: 4px;
padding: 20px;
display: none;
}
.results-area.visible {
display: block;
}
.result-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
font-weight: 500;
color: #555;
}
.result-value {
font-weight: 700;
font-size: 1.2em;
color: #2c3e50;
}
.result-value.highlight {
color: #27ae60;
font-size: 1.5em;
}
.result-value.warning {
color: #e74c3c;
}
.article-content h2 {
color: #2c3e50;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 10px;
margin-top: 40px;
}
.article-content h3 {
color: #34495e;
margin-top: 25px;
}
.article-content ul {
background-color: #f8f9fa;
padding: 20px 40px;
border-radius: 6px;
}
.formula-box {
background-color: #e8f4f8;
padding: 15px;
border-left: 4px solid #3498db;
margin: 20px 0;
font-family: monospace;
font-size: 1.1em;
}
function calculateFillRate() {
// 1. Get Input Values
var totalDemandInput = document.getElementById("totalDemand");
var shippedCountInput = document.getElementById("shippedCount");
var avgOrderValueInput = document.getElementById("avgOrderValue");
var resultsDiv = document.getElementById("results");
var revenueRow = document.getElementById("revenueRow");
// 2. Parse Float
var totalDemand = parseFloat(totalDemandInput.value);
var shippedCount = parseFloat(shippedCountInput.value);
var avgValue = parseFloat(avgOrderValueInput.value);
// 3. Validation Logic
if (isNaN(totalDemand) || totalDemand <= 0) {
alert("Please enter a valid number for Total Orders Placed.");
return;
}
if (isNaN(shippedCount) || shippedCount totalDemand) {
alert("Shipped orders cannot exceed Total Orders Placed.");
return;
}
// 4. Calculate Fill Rate
// Formula: (Shipped / Total) * 100
var fillRate = (shippedCount / totalDemand) * 100;
var missedRate = 100 – fillRate;
var unfilledCount = totalDemand – shippedCount;
// 5. Calculate Revenue Impact (if provided)
var lostRevenue = 0;
var showRevenue = false;
if (!isNaN(avgValue) && avgValue > 0) {
lostRevenue = unfilledCount * avgValue;
showRevenue = true;
}
// 6. Display Results
document.getElementById("fillRateResult").innerHTML = fillRate.toFixed(2) + "%";
document.getElementById("missedRateResult").innerHTML = missedRate.toFixed(2) + "%";
document.getElementById("unfilledCount").innerHTML = unfilledCount.toLocaleString();
if (showRevenue) {
revenueRow.style.display = "flex";
// Format as currency
document.getElementById("lostRevenueResult").innerHTML =
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(lostRevenue);
} else {
revenueRow.style.display = "none";
}
// Show results container
resultsDiv.classList.add("visible");
}
Understanding the Fill Rate Calculation Formula
In supply chain management and inventory control, Fill Rate is a critical Key Performance Indicator (KPI) that measures the ability of a business to meet customer demand with available stock. Unlike simple inventory turnover, fill rate directly quantifies customer satisfaction and order fulfillment efficiency.
Whether you are managing an e-commerce store, a wholesale distribution center, or a manufacturing plant, understanding your fill rate helps you identify bottlenecks in your supply chain and reduce lost sales due to stockouts.
The Core Formula
The standard fill rate is calculated as the percentage of customer orders that are fulfilled immediately from available stock. The formula is expressed as:
Fill Rate % = (Total Orders Shipped / Total Orders Placed) × 100
For example, if you receive 500 orders in a month and you are able to ship 475 of them immediately, your calculation would be:
- (475 ÷ 500) = 0.95
- 0.95 × 100 = 95% Fill Rate
Types of Fill Rates
Depending on the granularity of your data, you may calculate fill rate in three different ways:
- Order Fill Rate: The percentage of complete orders shipped. If a customer orders 3 items and you only ship 2, the order might be considered unfulfilled depending on your policy.
- Line Fill Rate: The percentage of individual line items (SKUs) on orders that are shipped completely. This is often more precise for complex orders.
- Unit Fill Rate: The percentage of total individual units shipped versus ordered. This provides the most granular view of inventory availability.
Why is Fill Rate Important?
A low fill rate indicates that you are frequently out of stock, leading to backorders, canceled orders, and dissatisfied customers. Conversely, a fill rate that is consistently 100% might suggest you are overstocking inventory, which ties up capital and increases holding costs.
Fill Rate vs. Service Level
While often used interchangeably, Service Level is a probability metric used in inventory planning (the probability of not having a stockout during a replenishment cycle), whereas Fill Rate is an empirical measurement of actual performance (what percentage of demand was actually met).
How to Improve Your Fill Rate
To optimize your fill rate without dangerously increasing inventory costs, consider the following strategies:
- Improve Demand Forecasting: Use historical data and seasonality trends to predict demand more accurately.
- Safety Stock Optimization: Calculate safety stock levels based on demand variability and lead time variability.
- Vendor Management: Work with suppliers to reduce lead times and improve the reliability of incoming shipments.
- Inventory Accuracy: Ensure your system data matches physical stock to prevent "ghost inventory" from skewing calculations.