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
Sample Covariance
—
Mean X
—
Mean Y
—
N (pairs)
—
Formula Used
Step-by-Step Breakdown
| i | xᵢ | yᵢ | (xᵢ − x̄) | (yᵢ − ȳ) | (xᵢ−x̄)(yᵢ−ȳ) |
|---|
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
- Enter your first dataset (X values) as comma-separated numbers.
- Enter your second dataset (Y values) — it must have the same count as X.
- Choose Population covariance (divide by N) or Sample covariance (divide by N−1).
- Click Calculate to see the result and a detailed step-by-step breakdown.
- 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.