Covariance Calculator

Enter two datasets and instantly compute their covariance — population or sample — with a full step-by-step breakdown.

Use the Covariance Calculator

Dataset Inputs

Comma-separated numbers

Must have the same count as X

Enter two datasets and click Calculate

Results and step-by-step working will appear here

Summary

Covariance measures the directional relationship between two variables — whether they tend to increase together (positive covariance) or move in opposite directions (negative covariance). This calculator accepts two comma-separated datasets, computes population covariance (divides by N) or sample covariance (divides by N-1), and shows a full step-by-step breakdown so you can verify every calculation. Results also include mean values and the number of data points used.

How it works

  1. Enter your first dataset (X values) as comma-separated numbers.
  2. Enter your second dataset (Y values) — it must have the same count as X.
  3. Choose Population covariance (divide by N) or Sample covariance (divide by N−1).
  4. Click Calculate to see the result and a detailed step-by-step breakdown.
  5. Optionally load an example dataset to see how the tool works.

Use cases

  • Determine whether two financial assets move together for portfolio analysis.
  • Verify hand-calculated covariance for statistics homework or exams.
  • Explore linear relationships between two variables before computing correlation.
  • Understand the direction and magnitude of co-movement in experimental data.
  • Compare population vs. sample covariance for the same dataset.
  • Teach or learn the covariance formula with a live worked example.

Frequently Asked Questions

Last updated: 2026-06-04 · Reviewed by Nham Vu