
{"id":3830,"date":"2021-02-10T12:01:00","date_gmt":"2021-02-10T11:01:00","guid":{"rendered":"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/uncategorized\/calculate-variance-in-excel\/"},"modified":"2022-01-07T15:40:14","modified_gmt":"2022-01-07T14:40:14","slug":"calculate-variance-in-excel","status":"publish","type":"post","link":"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/calculate-variance-in-excel\/","title":{"rendered":"How To Calculate Variance in Excel"},"content":{"rendered":"<p>Calculating variance allows you to determine the spread of numbers in a data set against the mean. This is a great tool for data analysts, who can use Excel to calculate the variance using functions like VAR.S and VAR.P. We\u2019ll explain how to use variance functions in this step-by-step tutorial.<\/p>\n<p>In mathematical terms, variance is the calculation of how far a set of values is from the average value (the mean). If the variance is zero, there isn\u2019t any variety\u2014all numbers are likely to be the same. As this number grows, the variance grows with it.<\/p>\n<p>This has all kinds of uses for analysts, from determining the different ages in a group to working out the spread of returns in different investment portfolios. Excel allows you to calculate variance like this by using functions aimed at entire data sets (population variance) or a small subset of a larger group of data (sample variance).<\/p>\n<p>This is an important distinction, as the way Excel calculates variance will differ depending on the size of your data set. If you\u2019re working with a smaller sample, you\u2019ll need to use <strong>VAR, VAR.S<\/strong>, or <strong>VARA<\/strong> functions to calculate variance. For population variance, you\u2019ll need to use <strong>VARP, VAR.P,<\/strong> or <strong>VARPA<\/strong> instead.<\/p>\n<p>While there are similarities between these functions, there are some important things to consider before you use them. In this article, we\u2019ll explain:<\/p>\n<ol>\n<li><a href=\"#what-are-variance-functions-in-excel-and-what-are-they-used-for\">What are variance functions in Excel and what are they used for?<\/a><\/li>\n<li><a href=\"#how-do-variance-functions-work-in-excel\">How do variance functions work in Microsoft Excel?<\/a><\/li>\n<li><a href=\"#things-to-consider-before-using-variance-functions-in-excel\">Things to consider before using variance functions in Excel<\/a><\/li>\n<li><a href=\"#how-to-calculate-variance-in-excel-a-step-by-step-guide\">How to calculate variance in Excel: A step by-step guide<\/a><\/li>\n<\/ol>\n<p>How do variance functions work in Excel? To help you, let\u2019s run through the basics.<\/p>\n<h2 id=\"what-are-variance-functions-in-excel-and-what-are-they-used-for\">1. What are variance functions in Excel and what are they used for?<\/h2>\n<p>Variance works by determining the spread of values against the mean. If you have a set of exam results for a group of students, you might end up with wildly different values in two separate exams, but with the same average. By determining the variance, you can determine how well the group performed as a whole.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-variance-example.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result\" \/><\/p>\n<p>You can calculate this spread (the variance) using Excel\u2019s variance functions. As we\u2019ve mentioned, there are two main forms of variance that you can calculate in Excel: <strong>population variance<\/strong> and <strong>sample variance<\/strong>. In this context, <strong>population<\/strong> is the entire set of data, rather than a <strong>sample<\/strong> (or smaller subset) of it.<\/p>\n<p>To calculate these values, you can use one of six variance functions in Excel. For sample variance, you can use the <strong>VAR, VAR.S<\/strong> or <strong>VARA<\/strong> functions. <strong>VAR<\/strong> is the original function, while <strong>VAR.S<\/strong> is the newer replacement, offering some speed enhancements over the original.<\/p>\n<p>VAR and VAR.S only support numerical values, but if you want to use text strings or logical tests for a sample set, you\u2019ll need to use <strong>VARA<\/strong> instead.<\/p>\n<p>For population variance, you\u2019ll need to use the <strong>VARP, VAR.P<\/strong> or <strong>VARPA<\/strong> functions. As with the sample variance functions, <strong>VARP<\/strong> is the original, while <strong>VAR.P<\/strong> is the newer (and recommended) replacement, with both functions working only with numerical values. To work with text strings or logicals, use <strong>VARPA<\/strong> instead.<\/p>\n<p>If you\u2019re thinking that this sounds a lot like <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/standard-deviation-excel\/\">standard deviation<\/a>, that\u2019s because it (almost) is. Standard deviation calculates, on average, how far your values are from the mean. Variation is simply the standard deviation value squared, which gives you an idea of how far all of your numbers are spread from the average.<\/p>\n<h2 id=\"how-do-variance-functions-work-in-excel\">2. How do variance functions work in Excel?<\/h2>\n<p>As we\u2019ve already mentioned, there are six variance functions that you can use in Excel, split into two categories to deal with either population or sample variation.<\/p>\n<p>These are:<\/p>\n<ul>\n<li><strong>VAR, VAR.S<\/strong> or <strong>VARA<\/strong> for <strong>sample variance,<\/strong> and<\/li>\n<li><strong>VARP, VAR.P<\/strong> or <strong>VARPA<\/strong> for <strong>population variance<\/strong>.<\/li>\n<\/ul>\n<p>Of these six, two functions (<strong>VAR<\/strong> and <strong>VARP<\/strong>) are considered outdated, having been replaced with <strong>VAR.S<\/strong> and <strong>VAR.P<\/strong>. These are interchangeable for the time being, but could be removed from Excel in the future.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-variance-numbers-example.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" \/><\/p>\n<p>Four of these functions (<strong>VAR, VARP, VAR.S<\/strong> and <strong>VAR.P<\/strong>)focus on <strong>numerical<\/strong> data. That means that, if you\u2019re a <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/data-analyst-career-prospects\/\">budding data analyst<\/a> trying to work out the variance from a set of numbers using either a sample of a data set or the entire data set, you\u2019d want to use these functions.<\/p>\n<p>Should your data be mixed, however, you\u2019ll need to use <strong>VARA<\/strong> or <strong>VARPA<\/strong> instead. These functions support text, numbers, and logical values (<strong>TRUE, FALSE<\/strong>, <strong>1<\/strong> or <strong>0<\/strong>).<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-variance-text-example.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" \/><\/p>\n<p>By support, we mean that text strings and logical results are converted to the numerical equivalent, where a text string is counted as a <strong>0<\/strong> (or <strong>FALSE<\/strong>). Logical values are counted as their numerical equivalent (<strong>0<\/strong> for <strong>FALSE<\/strong> or <strong>1<\/strong> for <strong>TRUE<\/strong>). This can have an impact on your overall results, so choose your functions carefully.<\/p>\n<p>If you want to create a formula using any of these variance functions, you\u2019ll need to use a set structure. The structure remains the same for each six functions:<\/p>\n<ul>\n<li><strong>=VAR(value1,<\/strong><strong><em>value2,<\/em><\/strong> <strong>\u2026)<\/strong><\/li>\n<li><strong>=VAR.S(value1,<\/strong><strong><em>value2<\/em><\/strong><strong>, \u2026)<\/strong><\/li>\n<li><strong>=VARP(value1,<\/strong><strong><em>value2<\/em><\/strong><strong>, \u2026)<\/strong><\/li>\n<li><strong>=VAR.P(value1,<\/strong><strong><em>value2,<\/em><\/strong> <strong>\u2026)<\/strong><\/li>\n<li><strong>=VARA(value1,<\/strong><strong><em>value2,<\/em><\/strong> <strong>\u2026)<\/strong><\/li>\n<li><strong>=VARPA(value1,<\/strong><strong><em>value2, **<\/em><\/strong>\u2026)**<\/li>\n<\/ul>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet with the VARA function typed into the formula bar with a range of cells selected\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-var-example.png\" alt=\"An Excel spreadsheet with the VARA function typed into the formula bar with a range of cells selected\" \/><\/p>\n<p>The only required argument in a variance formula using these functions is the reference to the data you use (<strong>value1<\/strong>). This can be referenced as a range of cells or as values directly (where <strong>value1<\/strong> is your first value, <strong>value2<\/strong> is your second value, etc).<\/p>\n<p>Only one value (<strong>value1<\/strong>) is required for a variance function to work. For cell ranges, this is considered as a single value (<strong>value1<\/strong>) for the purpose of creating your formula.<\/p>\n<h2 id=\"things-to-consider-before-using-variance-functions-in-excel\">3. Things to consider before using variance functions in Excel<\/h2>\n<p>There are plenty of considerations to make before you decide to calculate variance in Excel using these functions. In particular, you\u2019ll need to consider:<\/p>\n<ul>\n<li>While VAR and VAR.S are technically interchangeable, <strong>VAR.S<\/strong> is the replacement Excel function for sample data sets and should be used in the first instance. Likewise, <strong>VAR.P<\/strong> should be used over VARP for population data sets as the newer function.<\/li>\n<li>VAR, VAR.S, VARP and VARP only support <strong>numerical<\/strong> values. Other values (text strings, logical values, etc.) are ignored and won\u2019t count towards your result.<\/li>\n<li>If you want to count text or logical values as you calculate variance, you\u2019ll need to use <strong>VARA<\/strong> (for samples) or <strong>VARPA<\/strong> (for population sets).<\/li>\n<li>You can use references to cell ranges (eg. <strong>=VAR.S(A1:D10)<\/strong>) in your variance formulas, or reference each value separately (eg. <strong>=VAR.S(1,2,3,4)<\/strong>).<\/li>\n<li>If you reference each value separately, you can use up to <strong>254 different values<\/strong>. This is an Excel limitation and can\u2019t be increased. If you require more, fill out your spreadsheet first, then use a reference to the cell range containing those cells instead.<\/li>\n<li>Only a <strong>single<\/strong> argument (<strong>value1<\/strong>) is required, which can contain a single value or a reference to a range of cells. However, to calculate variance from a single value is redundant, so you\u2019ll need to use more arguments if you\u2019re typing these into your formula directly.<\/li>\n<li>If you\u2019re adding a text string as a value in a variance formula, you\u2019ll need to reference it in another cell for the formula to work, as directly adding a text string as a <strong>value<\/strong> argument will cause a #<strong>VALUE<\/strong> error to appear.<\/li>\n<\/ul>\n<h2 id=\"how-to-calculate-variance-in-excel-a-step-by-step-guide\">4. How to calculate variance in Excel: A step by-step guide<\/h2>\n<p>If you have a small sample from a larger data set, you can use the <strong>VAR<\/strong>, <strong>VAR.S<\/strong> or <strong>VARA<\/strong> functions to calculate the variance. If you\u2019re trying to calculate variance in Excel using the population data set (that is, the entire set of data, rather than the smaller sample), you can do this using <strong>VARP, VAR.P<\/strong> or <strong>VARPA<\/strong> instead.<\/p>\n<p>For the purpose of this guide, references to <strong>VAR<\/strong> and <strong>VAR.S<\/strong> are interchangeable. We\u2019ve used <strong>VAR.S<\/strong>, which is the newer and recommended function, but the older <strong>VAR<\/strong> can be used (for the time being) in older workbooks. If you can, however, use <strong>VAR.S<\/strong>.<\/p>\n<p>Likewise, references to <strong>VARP<\/strong> and <strong>VAR.P<\/strong> are also interchangeable, but you should use <strong>VAR.P<\/strong> in the first instance. <strong>VARA<\/strong> and <strong>VARPA<\/strong> remain available for all Excel users, regardless of the version used.<\/p>\n<h3 id=\"step-1-select-an-empty-cell\">Step 1: Select an empty cell<\/h3>\n<p>To insert a variance function into a new formula, start by opening the Excel workbook containing your data and selecting an empty cell. Alternatively, you can open a new workbook, making sure that the sheet containing your data remains open and minimized.<\/p>\n<p>With the cell selected, press the <strong>formula bar<\/strong> at the bottom of the ribbon bar until you see the blinking cursor.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. A red arrow is pointing to the formula bar, and an empty cell has been selected\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-var-ribbon-bar.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. A red arrow is pointing to the formula bar, and an empty cell has been selected\" \/><\/p>\n<p>When the blinking cursor is visible, you\u2019re ready to begin inserting your new formula.<\/p>\n<h3 id=\"step-2-insert-your-data-set-directly-or-using-cell-references\">Step 2: Insert your data set directly or using cell references<\/h3>\n<p>As we explained earlier, all variance functions in Excel use the same structure to create new formulas. To insert a new variance function using a sample data set (a smaller sample of a larger population set), start by typing <strong>=VAR.S(<\/strong> or <strong>=VARA(<\/strong> into the formula bar at the top.<\/p>\n<p>If you\u2019re working with a population data set (the entire data set), type <strong>=VAR.P(<\/strong> or <strong>=VARPA(<\/strong> instead.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VAR.P formula has been typed into the formula bar\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-var-insert-formula.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VAR.P formula has been typed into the formula bar\" \/><\/p>\n<p>With your formula opened, you\u2019ll need to insert your data next. Most users will likely prefer to reference data elsewhere in your current workbook (or in a minimized workbook) using a cell range.<\/p>\n<p>For instance, <strong>=VAR.S(C2:C10)<\/strong> or <strong>=VAR.P(C2:C20)<\/strong> completes the formula, using the numerical data in a cell range between cells <strong>C2<\/strong> and <strong>C10<\/strong> (for the sample set) or <strong>C2<\/strong> and <strong>C20<\/strong> (for the population set). Make sure to replace these references with your own.<\/p>\n<p>If you\u2019re working with data that contains numbers, text, and\/or logical values, <strong>=VARA(C2:C10)<\/strong> or <strong>=VARPA(C2:C20)<\/strong> will work best. Rather than ignoring text or logical values (as VAR, VAR.S, VARP or VAR.P would), the values in a VARA or VARPA formula will count towards your overall result.<\/p>\n<p>You could also reference each cell individually. For example <strong>=VARA(C2:C10)<\/strong> and <strong>=VARA(C2,C3,C4,C5,C6,C7,C8,C9,C10)<\/strong> will return the same result.<\/p>\n<p>If you\u2019re adding numerical values directly to your formula, you\u2019ll need to add the values one by one. Each value needs to be separated using commas. For instance, <strong>=VAR.S(1,2,3,4,5,6)<\/strong> or <strong>=VAR.P(1,2,3,4,5,6,7,8,9,10)<\/strong> will give you the variance between the numbers <strong>1<\/strong> and <strong>6<\/strong> (or <strong>1<\/strong> and <strong>10<\/strong> for a population set) directly.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VAR.S formula has been typed into the formula bar\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-var-insert-numbers-example.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VAR.S formula has been typed into the formula bar\" \/><\/p>\n<p>You can also do the same with <strong>VARA<\/strong> or <strong>VARPA<\/strong>. For example, <strong>=VARA(1,2,TRUE,3)<\/strong> would work, with the <strong>TRUE<\/strong> value counting as its numerical equivalent (<strong>1<\/strong>). Likewise, <strong>=VARPA(1,2,TRUE,3,4,10,8)<\/strong> would count these values in the same way, with <strong>TRUE<\/strong> counting as <strong>1<\/strong>.<\/p>\n<p>VARA and VARPA support text, but to use these, you\u2019ll need to use a cell reference or cell range. For instance, =<strong>VARA(1,2,TRUE,D5,3,4,10,8)<\/strong> or <strong>=VARA(D2:D9)<\/strong> would work, where <strong>D5<\/strong> contains text that counts as a <strong>FALSE<\/strong> value (<strong>0<\/strong>). If you try to add a text string directly, however, Excel will return a <strong>#VALUE<\/strong> error.<\/p>\n<p><img decoding=\"async\" title=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" src=\"\/en\/wp-content\/uploads\/old-blog-uploads\/excel-var-insert-text-example.png\" alt=\"An Excel spreadsheet containing data for student ID, student name, and exam result. The VARA formula has been typed into the formula bar\" \/><\/p>\n<p>If you\u2019ve added a reference to a cell range, make sure to close your formula with a closing parenthesis afterwards, then press <strong>enter<\/strong> to view the results (or click on another empty cell). For values added directly, place a closing parenthesis after the final value is inserted into your formula.<\/p>\n<h2 id=\"final-thoughts\">Final thoughts<\/h2>\n<p>By calculating the variance, you can learn a lot about the data you\u2019re working with. This makes the life of a typical data analyst even easier, allowing you to prove theories and hypotheses using a single Excel formula. Variance functions are among the <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/10-excel-formulas-every-data-analyst-should-know\/\">many Excel formulas<\/a> that data analysts use on a regular basis to find results.<\/p>\n<p>Excel makes mathematical functions like variance and standard deviation easier to handle, especially for beginners. There are also scripts on the internet that make it a little easier, such as this <a href=\"https:\/\/www.calculatorsoup.com\/calculators\/statistics\/variance-calculator.php\" rel=\"noopener\">variance calculator<\/a>\u2014but it&#8217;s way more rewarding to learn how to calculate variance on your own!<\/p>\n<p>If you\u2019re new to the field and you want to learn more, try this <a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/short-courses\/become-a-data-analyst\/\">free, five-day introductory data analytics course<\/a>. And, if you\u2019re keen to get to grips with more Excel formulas, check out the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/convert-text-to-numbers-excel\/\">How to convert text to numbers in Excel<\/a><\/li>\n<li><a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/sumif-function-excel\/\">How to use the SUMIF function in Excel<\/a><\/li>\n<li><a href=\"https:\/\/careerfoundry.inbearbeitung.de\/en\/blog\/data-analytics\/vlookup-function-excel\/\">How to use the VLOOKUP function in Excel<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Calculating variance allows you to determine the spread of numbers in a data set against the mean.  Learn how to calculate variance in Excel here.<\/p>\n","protected":false},"author":54,"featured_media":1488,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_lmt_disableupdate":"no","_lmt_disable":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-3830","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-analytics"],"acf":{"homepage_category_featured":false},"modified_by":"Kirstie Sequitin","_links":{"self":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts\/3830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/users\/54"}],"replies":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/comments?post=3830"}],"version-history":[{"count":0,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/posts\/3830\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/media\/1488"}],"wp:attachment":[{"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/media?parent=3830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/categories?post=3830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerfoundry.inbearbeitung.de\/en\/wp-json\/wp\/v2\/tags?post=3830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}