Excel Practice Test

β–Ά

Learning how to calculate covariance in Excel is one of the most valuable statistical skills you can pick up in 2026, whether you are analyzing investment portfolios, modeling product demand, or studying the relationship between two variables for a research paper. Covariance measures how two data series move together, and Excel gives you three reliable ways to compute it: the COVARIANCE.P function for population data, the COVARIANCE.S function for sample data, and the Covariance tool inside the Data Analysis ToolPak for multi-variable matrices.

Before we get into formulas, it helps to understand what the number actually represents. A positive covariance means that when one variable rises, the other tends to rise as well β€” think monthly sales and marketing spend. A negative covariance indicates an inverse relationship, like umbrella sales and sunny days. A covariance near zero suggests the two variables move independently of each other. The actual magnitude depends on the units involved, which is why analysts often convert covariance into correlation for easier comparison.

Excel users frequently confuse covariance with correlation, but they answer different questions. Correlation is a standardized version of covariance that always falls between -1 and +1, while covariance keeps the units of the original variables. Both have their place in financial modeling, risk analysis, and academic statistics, and Excel can compute either in a single keystroke once your data is structured into clean parallel columns.

This guide walks through every method step by step using concrete examples β€” including stock returns, exam scores, and sales data. We will compare COVARIANCE.P and COVARIANCE.S, build a full covariance matrix using the Excel Data Analysis Toolpak, and show you how to interpret the output so it actually informs a business or investing decision rather than sitting unused in a workbook.

You will also see how covariance connects to other essential Excel statistics like variance, standard deviation, and regression slope. Understanding these connections matters because the covariance number alone rarely tells the full story; it is one input into a broader toolkit that includes Modern Portfolio Theory, beta calculations, and multi-factor models used across Wall Street, corporate finance, and data analytics roles.

By the end of this article you will be able to choose the right formula for your dataset, build a clean covariance matrix in under five minutes, troubleshoot common errors like #DIV/0! and #N/A, and translate the resulting number into a clear takeaway for stakeholders. Whether you are an Excel beginner or a seasoned analyst brushing up on statistics, these techniques will move you from copying formulas blindly to confidently engineering your own.

We will also cover the practical formatting tricks that make covariance results readable in dashboards, including conditional formatting heatmaps, named ranges for portfolio symbols, and Power Query refresh strategies for live market data feeds. Each example assumes Excel 365 or Excel 2021, but every function shown also works in Excel 2016 and 2019 with identical syntax.

Covariance in Excel by the Numbers

πŸ“Š
2
Built-in Functions
⏱️
<5 min
Setup Time
πŸ’»
3
Calculation Methods
🎯
n-1
Sample Divisor
πŸ“š
1995
COVAR Introduced
Try Free Excel Practice Questions on Covariance

How to Calculate Covariance in Excel Step by Step

πŸ“‹

Place each variable in its own column with no blank rows. Use headers in row 1 β€” for example, Stock A Returns in column B and Stock B Returns in column C. Ensure both ranges have the same number of observations or the formula will return #N/A.

🎯

Use COVARIANCE.P when your data represents the entire population, such as all 12 months of last year's sales. Use COVARIANCE.S when working with a sample drawn from a larger group, like 30 trading days pulled from years of history.

✏️

In an empty cell type =COVARIANCE.S(B2:B31,C2:C31) and press Enter. The two arguments are the array of values for each variable. The order does not matter β€” covariance is symmetric, so swapping arrays returns an identical result.

πŸ”„

Open Data β†’ Data Analysis β†’ Covariance, select your input range with labels in the first row, and choose an output location. The diagonal shows variances; off-diagonal cells display covariances between each pair of columns.

πŸ“Š

Compare your covariance to zero. Positive means variables move together, negative means they move oppositely. To normalize the number into a -1 to +1 scale, divide by the product of the two standard deviations to get the correlation coefficient.

The difference between COVARIANCE.P and COVARIANCE.S is the divisor used in the calculation, and choosing wrong can skew your analysis by several percentage points on small datasets. COVARIANCE.P divides the sum of cross-deviations by n, the total number of observations, because it assumes you have data on every member of the population. COVARIANCE.S divides by n-1, applying Bessel's correction to remove bias when generalizing from a sample to a larger population that was not fully measured.

For investing applications, COVARIANCE.S is almost always the correct choice. When you pull 60 months of returns for two stocks, you are sampling from the infinite future and past distribution of those securities, not capturing every possible monthly return. The same logic applies to survey data, A/B test results, and any scenario where the data you have is a subset of what could theoretically exist. Use COVARIANCE.P only when your dataset truly is exhaustive β€” for example, every quiz score for every student in one specific classroom.

Before Excel 2010 the only function available was COVAR, which behaved identically to today's COVARIANCE.P. Microsoft kept COVAR for backward compatibility, so you may still see it in legacy workbooks. If you open a model built in 2008 that references COVAR, the formula will continue to work, but for clarity and consistency, modern best practice is to migrate to either COVARIANCE.P or COVARIANCE.S so other analysts know exactly which version of the calculation is running.

Both functions accept two array arguments and ignore text, logical values, and empty cells in the source ranges. However, if one array contains a different number of numeric values than the other β€” perhaps because one column has stray blanks β€” the function returns #N/A. This is a common source of errors when copying live data from a database or web query, so always validate row counts before trusting the output by using a quick COUNT() check on each column.

Building on what you already know about standard deviation formulas in Excel, the relationship between covariance and the standard deviations of each variable gives you the correlation coefficient. Specifically, correlation = covariance Γ· (stdev1 Γ— stdev2). This formula explains why correlation is unit-free while covariance carries the squared units of the underlying variables β€” a fact that often confuses students seeing the topic for the first time.

There is also a manual approach that produces identical results and helps build intuition. Subtract the mean of each variable from every observation, multiply the paired deviations together, sum the products, and divide by either n or n-1. Doing this once with a small dataset of five or six rows clarifies what the function is actually doing under the hood. It also helps you spot data quality issues like outliers that the built-in formula silently absorbs into the final number.

One final note: covariance is sensitive to scale. Multiplying every value in one column by ten multiplies the covariance by ten as well, even though the underlying relationship is unchanged. This is exactly why correlation exists as a normalized alternative. If you ever need to compare the strength of relationship between two pairs of variables measured in different units, convert to correlation before drawing conclusions about which pair moves more in sync.

Microsoft Excel Practice Test Questions

Prepare for the Microsoft Excel exam with our free practice test modules. Each quiz covers key topics to help you pass on your first try.

Microsoft Excel Excel Basic and Advance
Microsoft Excel Exam Questions covering Excel Basic and Advance. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Excel Formulas
Free Microsoft Excel Practice Test featuring Excel Formulas. Improve your Microsoft Excel Exam score with mock test prep.
Microsoft Excel Excel Functions
Microsoft Excel Mock Exam on Excel Functions. Microsoft Excel Study Guide questions to pass on your first try.
Microsoft Excel Excel MCQ
Microsoft Excel Test Prep for Excel MCQ. Practice Microsoft Excel Quiz questions and boost your score.
Microsoft Excel Excel
Microsoft Excel Questions and Answers on Excel. Free Microsoft Excel practice for exam readiness.
Microsoft Excel Excel Trivia
Microsoft Excel Mock Test covering Excel Trivia. Online Microsoft Excel Test practice with instant feedback.
Microsoft Excel Advanced Data Analysis Tools
Free Microsoft Excel Quiz on Advanced Data Analysis Tools. Microsoft Excel Exam prep questions with detailed explanations.
Microsoft Excel Advanced Formula and Macro...
Microsoft Excel Practice Questions for Advanced Formula and Macro Creation. Build confidence for your Microsoft Excel certification exam.
Microsoft Excel Advanced Formulas and Macros
Microsoft Excel Test Online for Advanced Formulas and Macros. Free practice with instant results and feedback.
Microsoft Excel Basic and Advance Question...
Microsoft Excel Study Material on Basic and Advance Questions and Answers. Prepare effectively with real exam-style questions.
Microsoft Excel Creating and Managing Charts
Free Microsoft Excel Test covering Creating and Managing Charts. Practice and track your Microsoft Excel exam readiness.
Microsoft Excel Data Visualization with Ch...
Microsoft Excel Exam Questions covering Data Visualization with Charts. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Formulas and Functions
Free Microsoft Excel Practice Test featuring Formulas and Functions. Improve your Microsoft Excel Exam score with mock test prep.
Microsoft Excel Formulas and Functions App...
Microsoft Excel Mock Exam on Formulas and Functions Application. Microsoft Excel Study Guide questions to pass on your first try.
Microsoft Excel Formulas Questions and Ans...
Microsoft Excel Test Prep for Formulas Questions and Answers. Practice Microsoft Excel Quiz questions and boost your score.
Microsoft Excel Functions Questions and An...
Microsoft Excel Questions and Answers on Functions Questions and Answers. Free Microsoft Excel practice for exam readiness.
Microsoft Excel Managing Data Cells and Ra...
Microsoft Excel Mock Test covering Managing Data Cells and Ranges. Online Microsoft Excel Test practice with instant feedback.
Microsoft Excel Managing Tables and Data
Free Microsoft Excel Quiz on Managing Tables and Data. Microsoft Excel Exam prep questions with detailed explanations.
Microsoft Excel Managing Tables and Table ...
Microsoft Excel Practice Questions for Managing Tables and Table Data. Build confidence for your Microsoft Excel certification exam.
Microsoft Excel Managing Worksheets and Wo...
Microsoft Excel Test Online for Managing Worksheets and Workbooks. Free practice with instant results and feedback.
Microsoft Excel MCQ Questions and Answers
Microsoft Excel Study Material on MCQ Questions and Answers. Prepare effectively with real exam-style questions.
Microsoft Excel Questions and Answers
Free Microsoft Excel Test covering Questions and Answers. Practice and track your Microsoft Excel exam readiness.
Microsoft Excel Trivia Questions and Answers
Microsoft Excel Exam Questions covering Trivia Questions and Answers. Master Microsoft Excel Test concepts for certification prep.
Microsoft Excel Workbook and Worksheet Man...
Free Microsoft Excel Practice Test featuring Workbook and Worksheet Management. Improve your Microsoft Excel Exam score with mock test prep.

Three Ways to Calculate Covariance β€” Including a VLOOKUP Excel Approach

πŸ“‹ COVARIANCE.S Formula

The fastest method for two variables is the COVARIANCE.S function. Type =COVARIANCE.S(range1, range2) into an empty cell, where each range is a column of paired observations. Excel returns a single number representing the sample covariance. This approach is ideal when you only need one pairwise relationship and your data lives in clean adjacent columns without gaps or text values mixed in.

You can also combine COVARIANCE.S with vlookup excel patterns to fetch matched returns from a larger dataset. For example, use VLOOKUP to pull each stock's monthly return based on date, then feed the resulting columns into COVARIANCE.S. This works well for portfolios where price history is stored in separate tables and you need to align dates before calculating the relationship between two assets.

πŸ“‹ Data Analysis ToolPak

The ToolPak's Covariance tool is the most efficient method when you have three or more variables. Enable the add-in via File β†’ Options β†’ Add-Ins β†’ Excel Add-ins β†’ Analysis ToolPak. Then go to Data β†’ Data Analysis β†’ Covariance, select your full input range, check Labels in First Row if applicable, and choose where to place the output. Excel builds a lower-triangular matrix in seconds.

One caveat: the ToolPak always uses the population formula (divides by n, not n-1). If you need sample covariances for a five-asset portfolio, multiply every cell in the matrix by n/(n-1) to convert. Many analysts overlook this distinction, so document your assumption clearly in any model that exits your workbook and lands on someone else's screen for review.

πŸ“‹ Manual Calculation

For learning purposes or auditing a result, calculate covariance from scratch. In column D, compute (B2 - AVERAGE($B$2:$B$31)). In column E, compute (C2 - AVERAGE($C$2:$C$31)). In column F, multiply D Γ— E for each row. Sum column F, then divide by n-1 for sample covariance or n for population covariance. The result must match COVARIANCE.S or COVARIANCE.P exactly.

This breakdown exposes every step and makes it easy to spot outliers driving the result. If one row contributes 80% of the sum, that single observation is dominating your covariance. You can then decide whether to investigate the data point, winsorize it, or remove it before re-running. The transparency is worth the extra cells when stakes are high or data quality is uncertain.

Should You Use Covariance or Correlation?

Pros

  • Covariance preserves the original units of measurement, useful for portfolio variance calculations
  • Excel's COVARIANCE.S and COVARIANCE.P functions take only seconds to enter
  • Required input for Modern Portfolio Theory, beta, and weighted portfolio variance formulas
  • The Data Analysis ToolPak builds full covariance matrices for any number of variables
  • Sign of the covariance immediately tells you the direction of the relationship
  • Works on any numeric dataset including financial returns, sales, scientific measurements

Cons

  • Magnitude is hard to interpret because it depends on the units of both variables
  • Cannot directly compare covariances between different pairs of variables
  • Highly sensitive to outliers, which can dominate the result
  • Returns #N/A when input arrays have mismatched lengths
  • ToolPak only returns population covariance β€” requires manual scaling for samples
  • Does not indicate the strength of a relationship the way correlation does

Covariance Calculation Checklist Before You Hit Enter

Confirm both data ranges have the same number of numeric observations
Remove blank cells, text values, and error codes from each column
Decide whether your data is a population (use COVARIANCE.P) or a sample (use COVARIANCE.S)
Place variables in adjacent columns with descriptive headers in row 1
Use absolute references like $B$2:$B$31 if you plan to copy the formula across cells
Verify the result against a manual calculation on at least three rows
Cross-check with the Data Analysis ToolPak when building a multi-variable matrix
Compute correlation alongside covariance for easier interpretation
Format the output cell with three to four decimal places for financial returns
Document the time period and units in a comment so future readers understand context
Always scale the ToolPak output for sample data

The Data Analysis ToolPak's Covariance tool divides by n, producing population covariance. For 60 months of returns, multiply every cell in the resulting matrix by 60/59 to convert to sample covariance. Skipping this step understates portfolio variance by about 1.7% in a 60-observation dataset β€” a small but meaningful bias in risk reporting.

Building a covariance matrix is the natural next step after mastering pairwise covariance. A matrix lets you see how every variable in your dataset relates to every other variable at once. For a portfolio with five stocks, the resulting 5Γ—5 matrix shows variances on the diagonal and covariances on the off-diagonals, giving you everything needed to compute portfolio variance via the standard matrix formula weights' Γ— Ξ£ Γ— weights.

To build one manually, list your variables across both the top row and the leftmost column. In each intersection cell, use COVARIANCE.S referencing the appropriate two columns. With five variables you fill 25 cells, but because the matrix is symmetric, you only need to compute 15 unique cells and mirror them. Using INDEX/MATCH or named ranges keeps the formulas readable, especially when stock tickers replace generic column letters.

The ToolPak shortcut is far faster. Select Data β†’ Data Analysis β†’ Covariance, highlight all five return columns including headers, check Labels in First Row, and pick an output cell. Excel generates the lower triangle in one click. Copy values to the upper triangle if you need a symmetric matrix for downstream matrix multiplication, since MMULT in Excel requires the full matrix and not just one half.

Once your matrix is in place, you can compute portfolio variance using MMULT and TRANSPOSE. The formula =MMULT(MMULT(TRANSPOSE(weights), cov_matrix), weights) returns the portfolio variance for any weight vector. Take the square root for portfolio standard deviation, which is the risk number you report alongside expected return. Pair this with the SOLVER add-in to find the minimum variance portfolio in less than a minute.

Common pitfalls include mixing daily and monthly returns in the same matrix, mismatched date ranges between assets, and forgetting to annualize covariances for reporting. To annualize, multiply daily covariances by 252 (trading days per year) or monthly covariances by 12. Annualization preserves the matrix structure but converts the numbers to comparable scale with other annual risk metrics like Sharpe ratio, Treynor ratio, and Jensen's alpha used in performance attribution.

If you build covariance matrices regularly, consider learning the full Excel functions list including CORREL, STDEV.S, and AVERAGE for combined dashboards. A typical risk dashboard pulls live data via Power Query, computes returns with simple subtraction, runs the covariance matrix, and feeds it into a portfolio optimizer. The entire pipeline refreshes with one click when new prices arrive in the source table.

For research or thesis work, document every assumption: the rebalancing assumption (typically buy-and-hold within the period), the return definition (arithmetic vs logarithmic), the data source, and whether dividends are reinvested. Reviewers will check these details before trusting your covariance numbers, and good documentation also helps you when you revisit the model six months later and need to reproduce the result.

Interpreting a covariance number requires context. A covariance of 0.000045 between two stock returns sounds tiny but actually represents a meaningful positive relationship when the underlying returns themselves average around 1% per month. The magnitude is small only because covariance carries squared units β€” in this case (decimal return)Β². Converting to correlation by dividing by the product of standard deviations is the fastest way to put the number on a scale your brain can actually evaluate.

For business reporting, always pair covariance with a plain-English sentence. Instead of saying "the covariance is 0.000045," say "these two stocks move together about 60% of the time based on a correlation of 0.62." Stakeholders rarely need the raw covariance, but they need the takeaway it implies. Save the precise number for the appendix or model documentation, and lead with the actionable insight.

Negative covariance is genuinely useful in portfolio construction because it indicates diversification benefit. When you hold one asset that gains during recessions and another that gains during expansions, their negative covariance reduces the overall portfolio variance below the average of the individual variances. This is the mathematical foundation of every textbook diversification example, from a 60/40 stock-bond split to a fully optimized multi-asset allocation across global equities, fixed income, and alternatives.

Outliers can dominate covariance results, especially in short datasets. A single 25% return during a market crash can swing a 24-month covariance by an order of magnitude. Before reporting, look at scatter plots of your two variables to spot extreme points. Tools like Excel's XY scatter chart make this easy, and combining the chart with a trendline visually confirms whether the calculated covariance aligns with the dot pattern you actually see on screen.

For econometric or research use, covariance feeds directly into linear regression. The slope of a simple regression line equals covariance(X,Y) divided by variance(X). Knowing this connection helps you debug regression results: if your regression slope looks odd, recompute the covariance and variance separately to identify which input is responsible. Excel's SLOPE function does this automatically, but the explicit decomposition often clarifies thinking.

You can also visualize a covariance matrix using conditional formatting heatmaps. Select the matrix, apply a color scale from Home β†’ Conditional Formatting, and red-green gradients immediately highlight pairs with the strongest positive or negative relationships. This is particularly powerful in a portfolio context because diversification opportunities β€” the deep red negative cells β€” jump out at a glance from a dense table of numbers.

For deeper financial applications including beta calculation, weighted average cost of capital, and capital asset pricing, explore Excel finance functions. Covariance is the building block behind every one of these models, and once you can produce a covariance matrix reliably, the leap to a complete portfolio analytics workbook becomes a matter of layering formulas on top of a foundation you already control.

Practice Excel Formulas Including VLOOKUP and Covariance

Beyond the basics, several practical tricks separate confident analysts from beginners. Use named ranges for each variable column β€” for example, name B2:B31 as Stock_A_Returns. Your formula then reads =COVARIANCE.S(Stock_A_Returns, Stock_B_Returns), which is dramatically more readable in audits and during stakeholder presentations. Names also auto-expand if you wrap your data in an Excel Table, eliminating the need to update ranges every time you add a new month of returns.

When pulling live data from a market provider, wrap COVARIANCE.S inside IFERROR to gracefully handle missing observations. For example: =IFERROR(COVARIANCE.S(A:A,B:B), "Insufficient data"). This pattern prevents the #N/A error from cascading through dashboards and breaking conditional formatting, summary statistics, and downstream pivot tables that may depend on the covariance cell as a source.

For dynamic datasets where the number of rows changes each month, use structured table references. If your data lives in Table1, =COVARIANCE.S(Table1[Stock_A], Table1[Stock_B]) automatically expands as new rows are added. Combine this with Power Query refresh and a scheduled file-open trigger, and your covariance matrix updates itself overnight with no manual intervention from the analyst.

If you collaborate with non-Excel users, consider exporting the covariance matrix to PDF or PNG for inclusion in reports. Excel's Snipping Tool or the built-in Camera tool can capture matrix snapshots that paste cleanly into Word or PowerPoint. Always include the time period and unit (daily returns, monthly log returns, etc.) in a caption underneath, because the matrix is meaningless without that context.

For very large datasets β€” say, returns on 500 S&P stocks over 10 years β€” Excel's standard COVARIANCE.S can slow down due to volatility of array calculations. In those cases, switch to Power Pivot with DAX measures using the COVAR function or use Power Query to pre-compute a covariance table externally. The ToolPak begins to lag noticeably past 50 columns, so plan your architecture accordingly when scaling beyond a handful of variables.

Finally, test your understanding by reproducing a published covariance number. Pull historical returns for two well-known stocks like Apple and Microsoft over the past 36 months, compute covariance with COVARIANCE.S, and compare to published values from a financial data vendor. If your number is within 1% of the reference, your methodology is sound. Discrepancies usually trace back to dividend handling, return type (arithmetic vs log), or sample window boundaries.

Mastering covariance unlocks correlation, regression, factor models, and the entire field of quantitative finance. Spend an hour practicing each method, run the ToolPak on a five-asset matrix, and build a small portfolio variance calculator from scratch. After that exercise, no statistics interview question or analyst project will catch you off guard, and you will have a permanent Excel template ready to deploy on any future dataset you encounter.

Excel Questions and Answers

What is the difference between COVARIANCE.P and COVARIANCE.S in Excel?

COVARIANCE.P divides the sum of cross-deviations by n (total observations) and assumes you have data on the entire population. COVARIANCE.S divides by n-1, applying Bessel's correction for samples drawn from a larger population. For financial returns and most real-world datasets, COVARIANCE.S is the appropriate choice because your data is almost always a sample of all possible observations rather than a complete enumeration of the underlying population.

Can I calculate covariance for more than two variables at once in Excel?

Yes, the Data Analysis ToolPak's Covariance tool builds a complete matrix for any number of variables in seconds. Enable the ToolPak via File β†’ Options β†’ Add-Ins, then go to Data β†’ Data Analysis β†’ Covariance. Select your input range, check Labels in First Row, and choose an output cell. Excel returns a lower-triangular matrix showing variances on the diagonal and pairwise covariances in the off-diagonal cells.

Why does my COVARIANCE.S formula return #N/A?

The #N/A error usually means your two input arrays have a different number of numeric values. Even one stray blank, text entry, or error cell in one column will cause a mismatch. Use COUNT() on each range to confirm equal counts. Also verify that you have at least two paired observations β€” COVARIANCE.S requires a minimum sample size and returns #DIV/0! when only one observation is present.

How do I convert covariance into correlation in Excel?

Divide the covariance by the product of the two standard deviations: correlation = COVARIANCE.S(A,B) / (STDEV.S(A) * STDEV.S(B)). Alternatively, use Excel's built-in CORREL function, which performs this calculation in one step. Correlation always falls between -1 and +1, making it easier to interpret than raw covariance, which depends on the units of the underlying variables and lacks an intuitive scale for comparison.

Is COVAR still supported in modern Excel?

Yes, COVAR continues to work in Excel 365, 2021, 2019, and 2016 for backward compatibility, but Microsoft considers it deprecated. It behaves identically to COVARIANCE.P. New workbooks should use COVARIANCE.P or COVARIANCE.S to make the assumed divisor explicit and to align with current Microsoft documentation. Legacy workbooks using COVAR will continue to function, but migrating them improves clarity for future analysts.

How do I annualize daily or monthly covariance?

Multiply daily covariances by 252 (the standard number of trading days per year) or monthly covariances by 12 to annualize. This preserves the matrix structure and makes the numbers comparable to annualized return and risk metrics like Sharpe ratio. Be careful to apply the same annualization factor to every cell in a covariance matrix if you want downstream portfolio variance and standard deviation calculations to remain internally consistent.

Can I use covariance with text or categorical data?

No, covariance is defined only for numeric data. COVARIANCE.S and COVARIANCE.P ignore text entries, but if you want to study the relationship between categorical variables, you need different tools like chi-square tests or CramΓ©r's V. For ordinal data such as Likert scale responses, you can compute Spearman rank correlation by first converting values to ranks using Excel's RANK.AVG function and then applying CORREL.

What does a covariance of zero mean?

A covariance close to zero suggests that two variables move independently of each other β€” when one rises, the other shows no systematic tendency to rise or fall. However, zero covariance only rules out linear relationships; two variables can have a covariance of zero and still be related non-linearly, such as Y = XΒ². Always supplement covariance with a scatter plot to confirm the absence of nonlinear patterns before declaring independence.

How is covariance used in portfolio risk?

Portfolio variance equals w' Γ— Ξ£ Γ— w, where w is the vector of asset weights and Ξ£ is the covariance matrix. Lower covariances between assets reduce overall portfolio variance, which is the mathematical basis for diversification. Negative covariances are especially valuable because they actively cancel risk. Use MMULT and TRANSPOSE in Excel to compute portfolio variance, then take the square root for portfolio standard deviation β€” the standard risk metric in modern portfolio theory.

Does the order of arguments matter in COVARIANCE.S?

No, covariance is symmetric, so COVARIANCE.S(A,B) returns the same number as COVARIANCE.S(B,A). The mathematical formula multiplies paired deviations together, and multiplication is commutative. This symmetry is also why covariance matrices are symmetric across their diagonal, which the Data Analysis ToolPak exploits by only filling the lower triangle. You can safely mirror values across the diagonal to create a full symmetric matrix for downstream matrix algebra operations.
β–Ά Start Quiz