# Answer scoring and ordering

## Overview

On Codidact, answers to questions are sorted by their scores, so that you'll see the best-received answers first. Each answer has a score based on a ratio of upvotes to total votes, weighted to favor posts with fewer downvotes. For example, a post with seven upvotes will be shown higher than a post with nine upvotes and two downvotes. This method gives a slight boost to contributions that are consistently viewed positively over more controversial answers that gather both upvotes and downvotes.

## Calculations Used

The actual score of a particular post is calculated as

This uses a modified form of a Wilson Score, assuming a binomial distribution. By default the weighting constant *z* is two, but each community can change this to another value as they see fit. Several charts and graphs showing the default weighting distribution are shown below.

Diagram showing the distribution in scores where upvotes less downvotes = 3 for different values of z

This table shows the scores for each combination of upvotes and downvotes where *z* = 2.