.attrition-calc-container {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
.attrition-calc-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 15px;
justify-content: space-between;
}
.attrition-calc-col {
flex: 1;
min-width: 250px;
margin-right: 15px;
margin-bottom: 15px;
}
.attrition-calc-col:last-child {
margin-right: 0;
}
.attrition-calc-label {
display: block;
font-weight: 600;
margin-bottom: 5px;
color: #333;
}
.attrition-calc-input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.attrition-calc-btn {
width: 100%;
padding: 12px;
background-color: #0056b3;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s;
}
.attrition-calc-btn:hover {
background-color: #004494;
}
.attrition-result-box {
margin-top: 20px;
padding: 20px;
background-color: #ffffff;
border-left: 5px solid #0056b3;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
display: none;
}
.attrition-result-item {
margin-bottom: 10px;
font-size: 18px;
}
.attrition-result-item span {
font-weight: bold;
color: #0056b3;
}
.attrition-error {
color: #d9534f;
margin-top: 10px;
display: none;
}
.calc-article {
margin-top: 40px;
line-height: 1.6;
color: #333;
}
.calc-article h2 {
color: #2c3e50;
margin-top: 30px;
}
.calc-article h3 {
color: #34495e;
}
.calc-article ul {
margin-bottom: 20px;
}
function calculateAttrition() {
var startCountInput = document.getElementById("startCount");
var endCountInput = document.getElementById("endCount");
var separationsInput = document.getElementById("separations");
var resultBox = document.getElementById("resultBox");
var errorBox = document.getElementById("calcError");
var resRate = document.getElementById("resRate");
var resAvg = document.getElementById("resAvg");
var start = parseFloat(startCountInput.value);
var end = parseFloat(endCountInput.value);
var sep = parseFloat(separationsInput.value);
// Validation
if (isNaN(start) || isNaN(end) || isNaN(sep) || start < 0 || end < 0 || sep < 0) {
errorBox.style.display = "block";
resultBox.style.display = "none";
return;
}
// Logic check: Average cannot be 0
var average = (start + end) / 2;
if (average === 0) {
errorBox.innerHTML = "Average headcount cannot be zero.";
errorBox.style.display = "block";
resultBox.style.display = "none";
return;
}
errorBox.style.display = "none";
// Calculation: (Separations / Average Headcount) * 100
var rate = (sep / average) * 100;
// Display Results
resRate.innerHTML = rate.toFixed(2) + "%";
resAvg.innerHTML = average.toFixed(1);
resultBox.style.display = "block";
}
How to Calculate an Attrition Rate
Attrition rate, often referred to as the churn rate or turnover rate, is a critical metric for Human Resources and business leaders. It measures the rate at which employees leave a workforce over a specific period. Understanding your attrition rate helps in identifying dissatisfaction within the company, forecasting hiring needs, and managing organizational costs.
The Attrition Rate Formula
To calculate the attrition rate accurately, you need three key pieces of data for the time period you are measuring (e.g., a month, quarter, or year):
- Start Headcount: The number of employees at the beginning of the period.
- End Headcount: The number of employees at the end of the period.
- Separations: The total number of employees who left the company (voluntarily or involuntarily) during that period.
The standard formula used is:
Attrition Rate = (Number of Separations / Average Number of Employees) x 100
Where the Average Number of Employees is calculated as:
Average = (Start Headcount + End Headcount) / 2
Example Calculation
Let's say you want to calculate the attrition rate for Q1. Here are your figures:
- Employees on January 1st: 200
- Employees on March 31st: 210
- Employees who left during Q1: 10
Step 1: Calculate Average Headcount
(200 + 210) / 2 = 205
Step 2: Calculate Rate
(10 / 205) * 100 = 4.88%
In this example, the company has a quarterly attrition rate of 4.88%.
Why Tracking Attrition Matters
While some attrition is natural (retirement, relocation), a high rate often signals underlying issues such as poor management, lack of career growth, or non-competitive compensation. High attrition is expensive due to the costs associated with recruiting, onboarding, and training new staff, not to mention the loss of institutional knowledge.