Average Calculator
Calculate Mean, Median, Mode, Range & Standard Deviation

Calculate Mean, Median, Mode, Range & Standard Deviation
// Range const range=sorted[n-1]-sorted[0];
// Std Dev const meanDiffSq=nums.map(v=>Math.pow(v-mean,2)); const variance=meanDiffSq.reduce((a,b)=>a+b,0)/n; const stdP=Math.sqrt(variance); const stdS=n>1?Math.sqrt(meanDiffSq.reduce((a,b)=>a+b,0)/(n-1)):0;
document.getElementById('avgMean').innerText=mean.toFixed(2); document.getElementById('avgMedian').innerText=median.toFixed(2); document.getElementById('avgMode').innerText=modeStr; document.getElementById('avgRange').innerText=range.toFixed(2); document.getElementById('avgCount').innerText=n; document.getElementById('avgSum').innerText=sum.toLocaleString(undefined,{maximumFractionDigits:2}); document.getElementById('avgMin').innerText=sorted[0]; document.getElementById('avgMax').innerText=sorted[n-1]; document.getElementById('avgStdP').innerText=stdP.toFixed(4); document.getElementById('avgStdS').innerText=stdS.toFixed(4); document.getElementById('avgSortedVals').innerText=sorted.join(', '); document.getElementById('avgRes').classList.add('active'); }
Enter your numbers in the text box, separated by commas, spaces, or line breaks. Click “Calculate” and the calculator instantly computes:
These are the three most common measures of central tendency in statistics:
Scores: 85, 92, 78, 95, 88, 90, 72, 85, 93, 87. Mean = 86.5, Median = 87.5, Mode = 85 (appears twice), Range = 95 โ 72 = 23.
Prices: $200K, $220K, $210K, $230K, $1.2M. Mean = $412K (skewed by the mansion), Median = $220K (much more representative). This is why real estate reports use median prices!
Dataset: 10, 10, 10, 10, 10. Mean = 10, Standard Deviation = 0 (no spread). Dataset: 2, 6, 10, 14, 18. Mean = 10, Standard Deviation โ 5.66 (high spread). Standard deviation measures how spread out the data is from the mean.
In everyday language, “average” and “mean” are used interchangeably and refer to the arithmetic mean. However, in statistics, “average” is a broader term that can refer to any central tendency measure including mean, median, and mode. The arithmetic mean is the most commonly used type of average.
Use the median when your data has outliers or is skewed. Common examples include income data (a few very high earners skew the mean), home prices, and response times. The median gives a more representative “middle” value in these cases.
Standard deviation measures how spread out data is from the mean. A low standard deviation means data points cluster close to the mean (consistent). A high standard deviation means data is spread out over a wide range (variable). In a normal distribution, about 68% of data falls within 1 SD, and 95% within 2 SDs.
Population standard deviation (ฯ) divides by N (total population size). Sample standard deviation (s) divides by N-1 to account for the fact that a sample underestimates variability. Use population SD when you have data for the entire group; use sample SD when working with a subset.