Statistical

COVARIANCE.S Function in Excel

Returns the sample covariance, the average of the products of deviations for each data point pair.

Syntax

  • =COVARIANCE.S(array1, array2)

Arguments

  • array1 (required): First data set
  • array2 (required): Second data set

Examples

  • =COVARIANCE.S(A1:A10, B1:B10) - Sample covariance - Result: Covariance value

COVARIANCE.S for data analysis

  • Confirm whether you need entire columns, filtered subsets, or distinct values.
  • Use [COUNTIFS](/functions/countifs/) and [SUMIFS](/functions/sumifs/) for multi-criteria metrics.
  • Pivot tables complement single-cell statistical formulas for exploration.

Common errors

  • Arrays must be same size

Use cases

  • Sample statistics
  • Correlation analysis
  • Portfolio analysis

Frequently asked questions

  • What is the COVARIANCE.S function in Excel? COVARIANCE.S returns the sample covariance, the average of the products of deviations for each data point pair. The syntax is =COVARIANCE.S(array1, array2). Typical use cases include sample statistics, correlation analysis, portfolio analysis.
  • How do I use the COVARIANCE.S function? To use COVARIANCE.S, type =COVARIANCE.S( in a cell and provide the required arguments. Excel will show you the syntax and parameter hints as you type. Make sure to close the parentheses and press Enter to execute the function.
  • What type of data does COVARIANCE.S work with? COVARIANCE.S works with numerical data and can handle ranges, arrays, and individual values. It ignores text values and empty cells in its calculations, focusing only on numeric data for accurate statistical analysis.
  • Why is COVARIANCE.S not working in my Excel? Common issues with COVARIANCE.S include Arrays must be same size. Start by checking the syntax =COVARIANCE.S(array1, array2), then verify each referenced cell or range.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.