nps-calculator
Compute Net Promoter Score (NPS) from promoter / passive / detractor counts, or from a raw array of 0–10 scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scores | No | Optional raw scores in 0–10. When provided, the engine buckets them itself and ignores `promoters`/`passives`/`detractors`. | |
| passives | No | Count of respondents who scored 7 or 8. Required if `scores` is not provided. | |
| promoters | No | Count of respondents who scored 9 or 10. Required if `scores` is not provided. | |
| detractors | No | Count of respondents who scored 0–6. Required if `scores` is not provided. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nps | Yes | Net Promoter Score in the range −100 to +100. Rounded to the nearest whole number. | |
| total | Yes | Total respondents counted. | |
| rating | Yes | Bain & Company's standard NPS bands: <0 needs-work, 0–30 good, 30–70 great, >70 world-class. | |
| npsExact | Yes | Unrounded NPS, useful when the caller wants extra precision. | |
| passives | Yes | Resolved passive count. | |
| promoters | Yes | Resolved promoter count (echoed back so the widget can chart it). | |
| detractors | Yes | Resolved detractor count. | |
| passivePct | Yes | Passives as a percentage of total, to one decimal. | |
| promoterPct | Yes | Promoters as a percentage of total, to one decimal. | |
| detractorPct | Yes | Detractors as a percentage of total, to one decimal. |