# How do we calculate the temperature?

The final result in Winningtemp's platform is calculated against the maximum possible value for each category, which would happen if, all users respond with the happiest smiley "😃"

One has 4 answer choices that correspond to a score of 0–3, where the happiest smiley gets 3 points. Winningtemp summarises all responses for the current time period and divides it by the maximum value for the same period, which gives us an index.

### Here’s an example:

5 users answer: 2, 1, 3, 3, 0 =9
Possible maximum points: 5*3 = 15
Result: 9/15 =0,6 *10 = Index: 6,0

In cases where the same user answers the same question multiple times, the most recent data is weighted more. This means that the most recent data contributes more to the final temperature score. This is called weighting moving average, or WMA.

The weighting factor used to calculate the WMA is determined by the number of answers in a given period. For example, if a user answered 5 times during 90 days (our default window) the WMA would be calculated as follows:

WMA = (A1 * 5) + (A2 * 4) + (A3 * 3) + (A4 * 2) + (A5 * 1) / (5 + 4+ 3 + 2 + 1)

Where:
A2 = the 2nd last answer
etc.

Changelog: