Calculate Nps

.nps-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e1e4e8; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); color: #333; } .nps-header { text-align: center; margin-bottom: 30px; } .nps-header h2 { color: #1a73e8; margin-bottom: 10px; } .nps-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 25px; } @media (max-width: 600px) { .nps-grid { grid-template-columns: 1fr; } } .nps-input-group { display: flex; flex-direction: column; } .nps-input-group label { font-weight: 600; margin-bottom: 8px; font-size: 14px; } .nps-input-group input { padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; transition: border-color 0.3s; } .nps-input-group input:focus { border-color: #1a73e8; outline: none; } .nps-button { width: 100%; padding: 15px; background-color: #1a73e8; color: white; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } .nps-button:hover { background-color: #1557b0; } .nps-result-box { margin-top: 30px; padding: 20px; border-radius: 8px; text-align: center; display: none; } .nps-score-value { font-size: 48px; font-weight: 800; margin: 10px 0; } .nps-breakdown { display: flex; justify-content: space-around; margin-top: 15px; font-size: 14px; color: #666; } .nps-article { margin-top: 40px; line-height: 1.6; border-top: 1px solid #eee; padding-top: 20px; } .nps-article h3 { color: #222; margin-top: 25px; } .nps-example { background: #f8f9fa; padding: 15px; border-left: 4px solid #1a73e8; margin: 20px 0; } .badge-promoter { color: #28a745; font-weight: bold; } .badge-passive { color: #ffc107; font-weight: bold; } .badge-detractor { color: #dc3545; font-weight: bold; }

Net Promoter Score (NPS) Calculator

Calculate your customer loyalty metric based on survey responses.

Your NPS Score
0
Total: 0
Promoters: 0%
Detractors: 0%

What is Net Promoter Score (NPS)?

The Net Promoter Score (NPS) is a gold-standard customer experience metric used by millions of businesses to measure how customers perceive their brand. It is calculated based on responses to a single question: "On a scale of 0 to 10, how likely are you to recommend our product/service to a friend or colleague?"

How to Calculate NPS

To calculate your Net Promoter Score, first categorize your survey respondents into three distinct groups based on the rating they provided:

  • Promoters (Score 9-10): Loyal enthusiasts who will keep buying and refer others.
  • Passives (Score 7-8): Satisfied but unenthusiastic customers who are vulnerable to competitive offerings.
  • Detractors (Score 0-6): Unhappy customers who can damage your brand and impede growth through negative word-of-mouth.

The mathematical formula is straightforward:

NPS = % Promoters – % Detractors

Example Calculation

Suppose you surveyed 200 customers and received the following results:

  • 120 Promoters (Score 9-10)
  • 50 Passives (Score 7-8)
  • 30 Detractors (Score 0-6)

Step 1: Calculate percentages. 120/200 = 60% Promoters. 30/200 = 15% Detractors.

Step 2: Subtract the Detractor percentage from the Promoter percentage. 60 – 15 = 45.

Result: Your Net Promoter Score is 45.

Interpreting Your NPS Result

NPS can range from -100 (if every customer is a Detractor) to +100 (if every customer is a Promoter). Generally:

  • Below 0: Needs significant improvement.
  • 0 to 30: Good, but there is room for growth.
  • 30 to 70: Excellent; your customers are very loyal.
  • Above 70: World-class; you have extreme brand advocacy.
function calculateNPS() { var p = parseFloat(document.getElementById("promoterInput").value) || 0; var pas = parseFloat(document.getElementById("passiveInput").value) || 0; var d = parseFloat(document.getElementById("detractorInput").value) || 0; var total = p + pas + d; if (total === 0) { alert("Please enter at least one respondent value."); return; } var percPromoters = (p / total) * 100; var percDetractors = (d / total) * 100; var nps = Math.round(percPromoters – percDetractors); var resultBox = document.getElementById("npsResultBox"); var scoreDisplay = document.getElementById("npsScoreValue"); var categoryDisplay = document.getElementById("npsCategory"); resultBox.style.display = "block"; scoreDisplay.innerText = nps; document.getElementById("totalRes").innerText = total; document.getElementById("percProm").innerText = percPromoters.toFixed(1); document.getElementById("percDet").innerText = percDetractors.toFixed(1); // Dynamic Styling based on score if (nps >= 70) { resultBox.style.backgroundColor = "#e6fffa"; resultBox.style.border = "2px solid #38b2ac"; scoreDisplay.style.color = "#2c7a7b"; categoryDisplay.innerText = "World Class"; } else if (nps >= 30) { resultBox.style.backgroundColor = "#f0fff4"; resultBox.style.border = "2px solid #68d391"; scoreDisplay.style.color = "#2f855a"; categoryDisplay.innerText = "Excellent"; } else if (nps >= 0) { resultBox.style.backgroundColor = "#fffaf0"; resultBox.style.border = "2px solid #f6ad55"; scoreDisplay.style.color = "#c05621"; categoryDisplay.innerText = "Good"; } else { resultBox.style.backgroundColor = "#fff5f5"; resultBox.style.border = "2px solid #feb2b2"; scoreDisplay.style.color = "#c53030"; categoryDisplay.innerText = "Needs Improvement"; } }

Leave a Comment