Skip to content

Covariance Calculator

comma-separated
comma-separated

Result

Covariance1.5
X Mean3
Y Mean4
InterpretationPositive covariance
↗ Math

Covariance Calculator — free online calculator.

Formula

Sample covariance = ((x1 − (x1 + x2 + x3 + x4) / 4) × (y1 − (y1 + y2 + y3 + y4) / 4) + (x2 − (x1 + x2 + x3 + x4) / 4) × (y2 − (y1 + y2 + y3 + y4) / 4) + (x3 − (x1 + x2 + x3 + x4) / 4) × (y3 − (y1 + y2 + y3 + y4) / 4) + (x4 − (x1 + x2 + x3 + x4) / 4) × (y4 − (y1 + y2 + y3 + y4) / 4)) / 3
  • Covariance Calculator calculates its result from x1, x2, x3, x4, y1, y2, y3, y4. It uses the formula Calculated with the verified ST Calculator runtime.. Change any input to recalculate the result instantly.
  • The main inputs are X Values, Y Values, Calculation Type. Enter them in the units and format shown in the calculator.
  • Keep comparable quantities in compatible units whenever the formula combines or compares them.
  • Changing any input above recalculates the result with the same calculation engine used by this page.

Example: Covariance

Inputs
  • X Values: 1,2,3,4,5 comma-separated
  • Y Values: 2,4,5,4,5 comma-separated
  • Calculation Type: sample

Using x1 = 1, x2 = 2, x3 = 3, x4 = 4, y1 = 2, y2 = 4, y3 = 5, y4 = 8, the calculated result is Sample covariance: 3.1666666667.

Sample result: Calculating…

Frequently asked questions

What does the Covariance calculate?

Covariance Calculator — free online calculator.

Which values should I enter?

Enter X Values, Y Values, Calculation Type using the units and format shown beside each field.

What formula does this calculator use?

The calculator uses the following relationship: Sample covariance = ((x1 − (x1 + x2 + x3 + x4) / 4) × (y1 − (y1 + y2 + y3 + y4) / 4) + (x2 − (x1 + x2 + x3 + x4) / 4) × (y2 − (y1 + y2 + y3 + y4) / 4) + (x3 − (x1 + x2 + x3 + x4) / 4) × (y3 − (y1 + y2 + y3 + y4) / 4) + (x4 − (x1 + x2 + x3 + x4) / 4) × (y4 − (y1 + y2 + y3 + y4) / 4)) / 3.

Why might my result differ from another source?

Results can differ when another source uses different units, rounding rules, conventions or assumptions. Compare the inputs and definitions before comparing results.

Does the result update automatically?

Yes. Changing an input updates the result using the same calculation engine shown on this page.

Page information

Updated: October 10, 2026