Excel functions / Statistics

COVARIANCE.S function

Sample covariance: like COVARIANCE.P, but divides by n − 1 for a sample.

Syntax

=COVARIANCE.S(array1, array2)

Arguments

When to use it

COVARIANCE.S measures how two sets of numbers move together in a sample: positive when they rise together, negative when one falls as the other rises. Its size depends on the units, so CORREL is easier to read; covariance is what goes into portfolio risk and regression.

Examples

  1. Ad spend against sales

    ABCD
    1Ad spendSales
    21001200247500
    32001900
    43003100
    54003800
    65005200

    In D2: =COVARIANCE.S(A2:A6, B2:B6) → 247500

    Try this example

Common mistakes

COVARIANCE.S in other languages

Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.

Translate a whole formula

Try COVARIANCE.S in the playground

Related functions