CalcToolsKitSimple tools. Clear answers.

Sample Covariance Calculator

Free · No sign-up

Measure paired co-variation with the sample n−1 denominator.

Your inputs

Example values are shown. Edit them for your calculation.

Results update automatically as you edit.

Inputs stay in this page. No account needed.

Your result

MATH

Example values are prefilled. Results update automatically when JavaScript is available.

What this tool calculates

Measure paired co-variation with the sample n−1 denominator.

Inputs used: x | y pairs.

On this page How it works & practical examples

How to use the Sample Covariance Calculator

Enter matched observations. Covariance keeps the product of the two measurement units, unlike a dimensionless correlation coefficient.

The calculation

Sample covariance = Σ[(x−x̄)(y−ȳ)]/(n−1)

Worked example

For pairs (1,2), (2,4) and (3,6), the means are x̄ = 2 and ȳ = 4. The three products of deviations are 2, 0 and 2. Their sum is 4; divide by n−1 = 2 to obtain a sample covariance of 2.

Understanding the result

A positive result means larger x values tend to occur with larger y values in these paired observations. The value has the product of the original units. Changing either variable’s scale changes the magnitude, so do not compare it directly with a unitless correlation.

Assumptions and limits

At least two pairs are required. The magnitude depends on units and scaling, so it is not a standardized measure of association strength.

Common questions

Why divide by n−1 rather than n?

This page reports sample covariance: it estimates co-variation from observed pairs after estimating both means. Population covariance uses n instead and gives a different number for the same finite data.

What if I reorder only one column?

Keep each x value paired with its original y value. Reordering one column changes which observations are matched and can change the covariance even though the two separate sets of values are unchanged.

Related calculators

Use Pearson Correlation for a unitless linear-association measure, or Spearman Rank Correlation for paired orderings.

AboutContactPrivacy PolicyTermsDisclaimerAll calculatorsSitemap