nps(ratings) from 0-10 survey ratings: promoters rate 9-10, detractors 0-6, passives 7-8. NPS = %promoters − %detractors, rounded to the nearest integer. Empty input returns 0.nps([10, 9, 8, 6, 2])
0
40% promoters − 40% detractors.
Count with comprehensions or a loop.
The passive band affects the denominators only.