{"id":70003,"date":"2026-11-09T07:27:51","date_gmt":"2026-11-09T01:57:51","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/tools\/standard-deviation-calculator\/"},"modified":"2026-11-09T07:27:51","modified_gmt":"2026-11-09T01:57:51","slug":"standard-deviation-calculator","status":"publish","type":"page","link":"https:\/\/www.quickonlinetips.com\/archives\/tools\/standard-deviation-calculator\/","title":{"rendered":"Standard Deviation Calculator: Sample and Population"},"content":{"rendered":"<p>This free <strong>standard deviation calculator<\/strong> finds the sample and population standard deviation of a list of numbers, with the variance, mean, median, mode, range and standard error. It also shows every step of the working, so you can check homework or learn how the formula works.<\/p>\n<style>.qsd-head{background:#fff;border:1px solid #C9D8EA;border-radius:12px;padding:16px;margin:14px 0 0;text-align:center} .qsd-big{font-size:clamp(30px,7vw,46px);font-weight:800;color:#215387;font-variant-numeric:tabular-nums;word-break:break-all} .qsd-cap{font-size:15px;color:#4A5568;margin:4px 0 0} .qsd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 0} .qsd-grid div{background:#fff;border:1px solid #E2E8F0;border-radius:10px;padding:10px 6px;text-align:center} .qsd-grid b{display:block;font-size:19px;color:#215387;font-variant-numeric:tabular-nums;word-break:break-all} .qsd-grid span{font-size:12.5px;color:#4A5568} .qsd-steps{background:#fff;border:1px solid #E2E8F0;border-radius:10px;padding:12px 14px;margin:12px 0 0;font-size:15px;line-height:1.6} .qsd-steps p{margin:0 0 6px} .qsd-steps code{font-size:14px;background:#F1F5FA;padding:1px 5px;border-radius:4px;word-break:break-all} .qsd-tw{max-height:340px;overflow:auto;margin:8px 0 0} @media (max-width:600px){.qsd-grid{grid-template-columns:1fr 1fr}}<\/style>\n<div class=\"qt-tool\" id=\"qsd\"><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Paste or type your numbers<\/p><textarea id=\"qsd-in\" style=\"min-height:140px\" placeholder=\"e.g. 4, 8, 15, 16, 23, 42&#10;Commas, spaces, tabs or new lines all work\" aria-label=\"Your numbers\"><\/textarea><p class=\"qt-small\" id=\"qsd-count\" style=\"text-align:left\">0 numbers<\/p><p class=\"qt-label\" style=\"font-size:1.15em;margin:18px 0 10px\"><strong>Step 2:<\/strong> Is your data a sample or the whole population? (the answer updates as you type)<\/p><div class=\"qt-row\" style=\"margin-top:0\"><div class=\"qt-seg\" id=\"qsd-kind\" role=\"group\" aria-label=\"Sample or population\"><button type=\"button\" data-v=\"s\" aria-pressed=\"true\">Sample (n &minus; 1)<\/button><button type=\"button\" data-v=\"p\" aria-pressed=\"false\">Population (N)<\/button><\/div><div class=\"qt-field\" style=\"min-width:150px\"><label for=\"qsd-dp\">Decimal places<\/label><select id=\"qsd-dp\"><option value=\"2\">2<\/option><option value=\"4\" selected>4<\/option><option value=\"6\">6<\/option><\/select><\/div><\/div><div id=\"qsd-out\" hidden><div class=\"qsd-head\"><p class=\"qsd-big\" id=\"qsd-sd\"><\/p><p class=\"qsd-cap\" id=\"qsd-sdcap\"><\/p><\/div><div class=\"qsd-grid\"><div><b id=\"qsd-n\">0<\/b><span>Count<\/span><\/div><div><b id=\"qsd-mean\">0<\/b><span>Mean (average)<\/span><\/div><div><b id=\"qsd-var\">0<\/b><span id=\"qsd-varl\">Variance<\/span><\/div><div><b id=\"qsd-other\">0<\/b><span id=\"qsd-otherl\">Population SD<\/span><\/div><div><b id=\"qsd-sum\">0<\/b><span>Sum<\/span><\/div><div><b id=\"qsd-med\">0<\/b><span>Median<\/span><\/div><div><b id=\"qsd-mode\">0<\/b><span>Mode<\/span><\/div><div><b id=\"qsd-range\">0<\/b><span>Range<\/span><\/div><div><b id=\"qsd-min\">0<\/b><span>Minimum<\/span><\/div><div><b id=\"qsd-max\">0<\/b><span>Maximum<\/span><\/div><div><b id=\"qsd-se\">0<\/b><span>Standard error<\/span><\/div><div><b id=\"qsd-cv\">0<\/b><span>Coefficient of variation<\/span><\/div><\/div><div class=\"qsd-steps\"><p><strong>Step by step<\/strong><\/p><p id=\"qsd-s1\"><\/p><p id=\"qsd-s2\"><\/p><p id=\"qsd-s3\"><\/p><p id=\"qsd-s4\"><\/p><div class=\"qsd-tw\"><table class=\"qt-table\" style=\"margin-top:4px\"><thead><tr><th>x<\/th><th>x &minus; mean<\/th><th>(x &minus; mean)&sup2;<\/th><\/tr><\/thead><tbody id=\"qsd-tb\"><\/tbody><\/table><\/div><p class=\"qt-small\" id=\"qsd-more\" style=\"text-align:left\"><\/p><\/div><\/div><div class=\"qt-row\"><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qsd-copy\">Copy the results<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qsd-sample\">Try sample data<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost qtx-nomark\" id=\"qsd-clear\">&#8634; Start over<\/button><\/div><p class=\"qt-status\" id=\"qsd-status\" aria-live=\"polite\"><\/p><p class=\"qt-note\"><strong>Private by design:<\/strong> your numbers are worked out in your own browser. Nothing is sent to QuickOnlineTips or stored.<\/p><\/div>\n<script>(function () { function qtReady(fn) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function qtCopy(text, statusEl, okMsg) { function done(ok) { if (statusEl) { statusEl.textContent = ok ? (okMsg || 'Copied to clipboard.') : 'Press Ctrl+C (or Cmd+C) to copy.'; } } function fallback() { var ta = document.createElement('textarea'); ta.value = text; ta.setAttribute('readonly', ''); ta.style.position = 'fixed'; ta.style.top = '-1000px'; document.body.appendChild(ta); ta.select(); var ok = false; try { ok = document.execCommand('copy'); } catch (e) { ok = false; } document.body.removeChild(ta); done(ok); } if (navigator.clipboard) { if (window.isSecureContext) { navigator.clipboard.writeText(text).then(function () { done(true); }, fallback); return; } } fallback(); } qtReady(function () { var root = document.getElementById('qsd'); if (!root) { return; } function $(id) { return document.getElementById('qsd-' + id); } var kind = 's', summary = ''; function dp() { return Number($('dp').value); } function f(x) { if (!isFinite(x)) { return 'n\/a'; } var r = Number(x.toFixed(dp())); if (r === 0) { r = 0; } var s = String(r); if (Math.abs(r) >= 1e6) { return r.toLocaleString(undefined, { maximumFractionDigits: dp() }); } return s; } function parse() { var raw = $('in').value.slice(0, 1000000), toks = raw.split(\/[\\s,;]+\/), nums = [], bad = 0; toks.forEach(function (t) { if (!t) { return; } var v = Number(t); if (t.trim() !== '') { if (isFinite(v)) { nums.push(v); } else { bad++; } } }); return { nums: nums.slice(0, 100000), bad: bad }; } function calc() { var p = parse(), x = p.nums, n = x.length, out = $('out'); $('count').textContent = n + (n === 1 ? ' number' : ' numbers') + (p.bad ? (p.bad === 1 ? ' (1 item that is not a number was ignored)' : ' (' + p.bad + ' items that are not numbers were ignored)') : ''); if (2 > n) { out.hidden = true; summary = ''; return; } var sum = 0, i; for (i = 0; n > i; i++) { sum += x[i]; } var mean = sum \/ n, ss = 0; for (i = 0; n > i; i++) { ss += (x[i] - mean) * (x[i] - mean); } var vs = ss \/ (n - 1), vp = ss \/ n, sds = Math.sqrt(vs), sdp = Math.sqrt(vp); var s = x.slice().sort(function (a, b) { return a - b; }), med = n % 2 ? s[(n - 1) \/ 2] : (s[n \/ 2 - 1] + s[n \/ 2]) \/ 2; var cnt = {}, best = 0, modes = []; s.forEach(function (v) { cnt[v] = (cnt[v] || 0) + 1; if (cnt[v] > best) { best = cnt[v]; } }); Object.keys(cnt).forEach(function (k) { if (cnt[k] === best) { modes.push(Number(k)); } }); modes.sort(function (a, b) { return a - b; }); var modeTxt = best === 1 ? 'none' : modes.slice(0, 4).map(f).join(', ') + (modes.length > 4 ? ' ...' : ''); var isS = kind === 's', sd = isS ? sds : sdp, v = isS ? vs : vp; $('sd').textContent = (isS ? 's = ' : '\u03c3 = ') + f(sd); $('sdcap').textContent = isS ? 'Sample standard deviation (divides by n \u2212 1 = ' + (n - 1) + ')' : 'Population standard deviation (divides by N = ' + n + ')'; $('n').textContent = n; $('mean').textContent = f(mean); $('var').textContent = f(v); $('varl').textContent = isS ? 'Sample variance (s\u00b2)' : 'Population variance (\u03c3\u00b2)'; $('other').textContent = f(isS ? sdp : sds); $('otherl').textContent = isS ? 'Population SD (\u03c3)' : 'Sample SD (s)'; $('sum').textContent = f(sum); $('med').textContent = f(med); $('mode').textContent = modeTxt; $('range').textContent = f(s[n - 1] - s[0]); $('min').textContent = f(s[0]); $('max').textContent = f(s[n - 1]); $('se').textContent = f(sds \/ Math.sqrt(n)); $('cv').textContent = mean === 0 ? 'n\/a' : f(sd \/ Math.abs(mean) * 100) + '%'; $('s1').textContent = '1. Mean = sum \u00f7 count = ' + f(sum) + ' \u00f7 ' + n + ' = ' + f(mean); $('s2').textContent = '2. Subtract the mean from each value and square it (table below). Add the squares: \u03a3(x \u2212 mean)\u00b2 = ' + f(ss); $('s3').textContent = '3. Variance = ' + f(ss) + ' \u00f7 ' + (isS ? (n - 1) + ' (n \u2212 1)' : n + ' (N)') + ' = ' + f(v); $('s4').textContent = '4. Standard deviation = \u221a' + f(v) + ' = ' + f(sd); var tb = $('tb'); while (tb.firstChild) { tb.removeChild(tb.firstChild); } var lim = Math.min(n, 50); for (i = 0; lim > i; i++) { var tr = document.createElement('tr'); [x[i], x[i] - mean, (x[i] - mean) * (x[i] - mean)].forEach(function (val) { var td = document.createElement('td'); td.textContent = f(val); tr.appendChild(td); }); tb.appendChild(tr); } $('more').textContent = n > 50 ? 'Showing the first 50 of ' + n + ' rows. All ' + n + ' values are used in the results.' : ''; out.hidden = false; summary = 'Count ' + n + ', mean ' + f(mean) + ', sample SD ' + f(sds) + ', population SD ' + f(sdp) + ', sample variance ' + f(vs) + ', population variance ' + f(vp) + ', median ' + f(med) + ', min ' + f(s[0]) + ', max ' + f(s[n - 1]); } Array.prototype.forEach.call($('kind').getElementsByTagName('button'), function (b) { b.addEventListener('click', function () { kind = b.getAttribute('data-v'); Array.prototype.forEach.call($('kind').getElementsByTagName('button'), function (y) { y.setAttribute('aria-pressed', y === b ? 'true' : 'false'); }); calc(); }); }); $('in').addEventListener('input', calc); $('dp').addEventListener('change', calc); $('copy').addEventListener('click', function () { if (!summary) { $('status').textContent = 'Step 1 first: enter at least 2 numbers.'; return; } qtCopy(summary, $('status'), 'Results copied.'); }); $('sample').addEventListener('click', function () { $('in').value = '9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4'; $('status').textContent = 'Sample data loaded: 20 numbers.'; calc(); }); $('clear').addEventListener('click', function () { $('in').value = ''; $('status').textContent = ''; calc(); $('in').focus(); }); calc(); }); })();<\/script>\n<div class=\"qt-next\"><p class=\"qt-next-h\">Try another free tool<\/p><div class=\"qt-next-g\"><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/average-calculator\/\">Average Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/scientific-calculator\/\">Scientific Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/percentage-calculator\/\">Percentage Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/fraction-calculator\/\">Fraction Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/gpa-calculator\/\">GPA Calculator<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/json-to-csv\/\">JSON to CSV Converter<\/a><\/div><\/div>\n<p><strong>Quick answer:<\/strong> Paste your numbers (separated by commas, spaces or new lines), choose <strong>Sample<\/strong> or <strong>Population<\/strong>, and the standard deviation appears at once with the step-by-step working below it.<\/p>\n<h2>Sample or population standard deviation?<\/h2>\n<ul>\n<li><strong>Population (&sigma;):<\/strong> use it when your numbers are the whole group you care about, such as the scores of every student in one class. It divides by N, the number of values.<\/li>\n<li><strong>Sample (s):<\/strong> use it when your numbers are a sample taken from a bigger group, such as 50 people surveyed from a city. It divides by n &minus; 1, which gives a better estimate for the whole group.<\/li>\n<\/ul>\n<p>If you are not sure, most statistics classes and spreadsheets use the sample standard deviation by default.<\/p>\n<h2>Standard deviation formula<\/h2>\n<p>Population: &sigma; = &radic;( &Sigma;(x &minus; &mu;)&sup2; &divide; N )<br \/>Sample: s = &radic;( &Sigma;(x &minus; x&#772;)&sup2; &divide; (n &minus; 1) )<\/p>\n<ol>\n<li>Find the mean: add all the values and divide by how many there are.<\/li>\n<li>Subtract the mean from each value and square the result.<\/li>\n<li>Add up the squares.<\/li>\n<li>Divide by N (population) or n &minus; 1 (sample). This is the variance.<\/li>\n<li>Take the square root. This is the standard deviation.<\/li>\n<\/ol>\n<h2>Worked example<\/h2>\n<p>For the numbers 2, 4, 4, 4, 5, 5, 7, 9 the mean is 40 &divide; 8 = 5. The squared differences are 9, 1, 1, 1, 0, 0, 4, 16, which add up to 32. The population variance is 32 &divide; 8 = 4, so the population standard deviation is 2. The sample variance is 32 &divide; 7 = 4.571, so the sample standard deviation is about 2.138.<\/p>\n<p>Need just the mean, median and mode? Use the <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/average-calculator\/\">average calculator<\/a>. For other maths, try the <a href=\"https:\/\/www.quickonlinetips.com\/archives\/tools\/scientific-calculator\/\">scientific calculator<\/a>.<\/p>\n<h2>FAQ<\/h2>\n<h3>What does standard deviation tell you?<\/h3>\n<p>It measures how spread out the numbers are around the mean. A small standard deviation means the values sit close to the average; a large one means they are spread widely.<\/p>\n<h3>What is the difference between variance and standard deviation?<\/h3>\n<p>Variance is the average of the squared differences from the mean. Standard deviation is its square root, so it is in the same units as your data, which makes it easier to read.<\/p>\n<h3>Can I paste numbers from a spreadsheet?<\/h3>\n<p>Yes. Copy a column or row from Excel or Google Sheets and paste it in. Tabs, spaces, commas and new lines all work, and anything that is not a number is ignored and counted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This free standard deviation calculator finds the sample and population standard deviation of a list of numbers, with the variance, mean, median, mode, range and standard error. It also shows every step of the working, so you can check homework or learn how the formula works. Quick answer: Paste your numbers (separated by commas, spaces&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":65595,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-70003","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=70003"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70003\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/65595"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=70003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}