Star rating system

Hello friends, I want to add the star ratings of users like google maps, when it shows the rating that its users gave to a business.

Suppose I have these users:

  • User #1: 4.3 stars
  • User #2: 5 stars
  • User #3: 2.8 stars
  • User #4: 1.9 stars
  • User #5: 4.3 stars
  • User #6: 5 stars

How is the total number of stars calculated if I work with a maximum of 5?

Thanks in advance :smiley:

So you want to show the average of the 5 highest rating ? If this is what you want get rating in a list and then create a procedure. I used [Discontinued] ListAddon Extension

1 Like

Check the rating calculation algorithm.

Demo Ratings

5 star - 252
4 star - 124
3 star - 40
2 star - 29
1 star - 33

Method to calculate

(5*252 + 4*124 + 3*40 + 2*29 + 1*33) / (252+124+40+29+33) = 4.11 and change
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.