.nps-calc-container {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 600px;
margin: 20px auto;
padding: 25px;
border: 1px solid #e0e0e0;
border-radius: 12px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.nps-calc-header {
text-align: center;
margin-bottom: 25px;
}
.nps-calc-group {
margin-bottom: 20px;
}
.nps-calc-group label {
display: block;
font-weight: 600;
margin-bottom: 8px;
color: #333;
}
.nps-calc-group input {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 6px;
font-size: 16px;
box-sizing: border-box;
}
.nps-calc-group input:focus {
border-color: #0073aa;
outline: none;
}
.nps-btn {
width: 100%;
padding: 15px;
background-color: #0073aa;
color: white;
border: none;
border-radius: 6px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
}
.nps-btn:hover {
background-color: #005177;
}
.nps-result-box {
margin-top: 25px;
padding: 20px;
background-color: #f9f9f9;
border-radius: 8px;
text-align: center;
}
.nps-score {
font-size: 48px;
font-weight: 800;
color: #0073aa;
margin: 10px 0;
}
.nps-interpretation {
font-weight: 600;
font-size: 18px;
margin-bottom: 10px;
}
.nps-stats {
display: flex;
justify-content: space-around;
font-size: 14px;
color: #666;
margin-top: 15px;
border-top: 1px solid #eee;
padding-top: 15px;
}
.article-section {
max-width: 800px;
margin: 40px auto;
line-height: 1.6;
color: #333;
}
.article-section h2 {
color: #222;
border-bottom: 2px solid #0073aa;
padding-bottom: 10px;
margin-top: 30px;
}
.formula-box {
background: #f0f7ff;
padding: 15px;
border-left: 5px solid #0073aa;
font-family: monospace;
margin: 20px 0;
}
How to Calculate Net Promoter Score (NPS)
The Net Promoter Score (NPS) is a gold-standard metric used by businesses globally to measure customer loyalty and satisfaction. It is based on a single question: "On a scale of 0 to 10, how likely are you to recommend our company/product/service to a friend or colleague?"
1. Categorize Your Responses
Before performing the calculation, you must group your respondents into three distinct categories based on their numerical score:
- Promoters (9-10): These are your most loyal customers. They are enthusiastic about your brand and act as brand ambassadors, fueling growth through word-of-mouth.
- Passives (7-8): These customers are satisfied but unenthusiastic. They are vulnerable to competitive offerings and are not included in the final NPS calculation logic beyond being part of the total response count.
- Detractors (0-6): These are unhappy customers who can damage your brand and impede growth through negative word-of-mouth.
2. The NPS Formula
Calculating your NPS is straightforward once you have the counts for each category. Use the following mathematical formula:
NPS = (% of Promoters) – (% of Detractors)
Alternatively, you can use the raw numbers:
NPS = [(Number of Promoters – Number of Detractors) / (Total Respondents)] x 100
3. Example NPS Calculation
Suppose you surveyed 200 customers and received the following results:
- 140 Promoters (Score 9-10)
- 40 Passives (Score 7-8)
- 20 Detractors (Score 0-6)
Step 1: Calculate the percentages.
Promoters: (140 / 200) * 100 = 70%
Detractors: (20 / 200) * 100 = 10%
Step 2: Subtract the Detractor percentage from the Promoter percentage.
70 – 10 = 60
In this example, your NPS is 60. Note that NPS is always displayed as a whole number, not a percentage.
What is a Good NPS?
NPS scores can range from -100 (everyone is a detractor) to +100 (everyone is a promoter).
- Below 0: Indicates your company has more detractors than promoters. High priority for improvement.
- 0 to 30: A good range, but there is significant room for improvement.
- 30 to 70: Excellent. Your company has a healthy ratio of happy customers.
- 70 to 100: World-class. This level of customer loyalty is rare and indicates extreme brand strength.
function calculateNPS() {
var p = parseFloat(document.getElementById('promoters').value);
var s = parseFloat(document.getElementById('passives').value);
var d = parseFloat(document.getElementById('detractors').value);
// Validate inputs
if (isNaN(p) || p < 0) p = 0;
if (isNaN(s) || s < 0) s = 0;
if (isNaN(d) || d = 70) {
statusEl.innerText = "Excellent (World-Class)";
statusEl.style.color = "#28a745";
} else if (finalScore >= 30) {
statusEl.innerText = "Great";
statusEl.style.color = "#218838";
} else if (finalScore >= 0) {
statusEl.innerText = "Good";
statusEl.style.color = "#ffc107";
} else {
statusEl.innerText = "Needs Improvement";
statusEl.style.color = "#dc3545";
}
}