Calculate the true "Top Rated" score (Bayesian Average) for items, products, or movies to ensure fair ranking between items with few reviews and items with many reviews.
The current star rating or score (e.g., 1-5 or 1-10).
Total number of votes/reviews for this specific item.
The average rating across ALL items in your list/database.
Minimum reviews required to be listed (confidence weight).
Weighted "Top Rated" Score
–
Original Average
–
Adjustment Impact
–
Confidence Weight
–
Why You Need a Weighted Rating Calculator
When sorting lists by "Top Rated," a common problem arises: simple averages are misleading. An item with a single 5-star review (Average: 5.0) will mathematically rank higher than a popular item with five hundred 4.9-star reviews. This calculator uses the Bayesian Average method, often used by major platforms like IMDb and Amazon, to solve this problem.
How the Calculation Works
This "Top Rated Calculator" uses a weighted formula that pulls the item's rating toward the global average based on how many reviews it has. The more reviews an item has, the more its own rating dominates. If an item has very few reviews, the global average dominates, preventing outliers from gaming the system.
The Formula:
W = (R × v + m × C) / (R + m)
W: The final Weighted Score.
R: Number of reviews for the item.
v: Average rating of the item.
m: Minimum votes required to be listed (the "weight" of the prior).
C: The mean vote across the whole report (the global average).
Understanding the Inputs
Item's Average Rating (v): The raw score displayed on the product page.
Number of Reviews (R): The sample size. Small samples are less statistically significant.
Global Average (C): This acts as a baseline. For 5-star systems, this is usually around 3.5 or 4.0. For 10-star systems (like movies), it's usually around 6.0 or 7.0.
Minimum Threshold (m): This is a tuning parameter. A higher number makes the ranking "stiffer," meaning an item needs many reviews to deviate from the global average.
When to Use This Tool
Use this calculator if you are managing an e-commerce store, a review aggregator, or a "Best of" list. It helps you determine the true ranking order of items with varying popularity levels, ensuring that your "Top Rated" list genuinely reflects quality rather than just low sample size luck.
function calculateTopRatedScore() {
// 1. Get input values using var
var itemRating = document.getElementById('itemRating').value;
var reviewCount = document.getElementById('reviewCount').value;
var globalMean = document.getElementById('globalMean').value;
var minThreshold = document.getElementById('minThreshold').value;
// 2. Validate inputs
// Ensure inputs are not empty and are valid numbers
if (itemRating === "" || reviewCount === "" || globalMean === "" || minThreshold === "") {
alert("Please fill in all fields to calculate the score.");
return;
}
// Parse values to floats/ints
var v = parseFloat(itemRating); // average rating of item
var R = parseFloat(reviewCount); // count of reviews for item
var C = parseFloat(globalMean); // mean vote across whole database
var m = parseFloat(minThreshold); // minimum votes required
if (isNaN(v) || isNaN(R) || isNaN(C) || isNaN(m)) {
alert("Please enter valid numeric values.");
return;
}
if (R < 0 || m 0 ? "+" : "";
var scoreFormatted = weightedScore.toFixed(2);
var originalFormatted = v.toFixed(2);
var diffFormatted = differenceSign + difference.toFixed(2);
// Calculate "Confidence" (How much of the score is based on R vs m)
// This is a simplified visual metric
var confidencePercent = (R / (R + m)) * 100;
var confidenceString = confidencePercent.toFixed(0) + "%";
// 5. Output Results
var resultContainer = document.getElementById('resultContainer');
var scoreDisplay = document.getElementById('finalScoreDisplay');
var originalDisplay = document.getElementById('originalDisplay');
var impactDisplay = document.getElementById('impactDisplay');
var weightDisplay = document.getElementById('weightDisplay');
// Show container
resultContainer.style.display = "block";
// Update Text
scoreDisplay.innerHTML = scoreFormatted;
originalDisplay.innerHTML = originalFormatted;
// Color code the impact
if (difference 0) {
impactDisplay.innerHTML = diffFormatted;
impactDisplay.style.color = "#27ae60"; // Green for upward correction
} else {
impactDisplay.innerHTML = "0.00";
impactDisplay.style.color = "#7f8c8d";
}
weightDisplay.innerHTML = confidenceString + " Real Data";
// Scroll to results for mobile users
resultContainer.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}