Math
Covariance Calculator
Compute covariance for paired datasets (X and Y). Choose sample or population, see means, deviations, cross-products, and export the calculation table to CSV.
Covariance of X and Y
Paste values for X and Y (same length). Separate values with commas, spaces, or new lines.
Tip: Covariance is scale-dependent. If you need a standardized strength measure, use a correlation calculator.
| Item | Meaning | Formula | Why it matters |
|---|---|---|---|
| Mean of X | Average of X values | x̄ = Σxi / N | Baseline for deviations |
| Mean of Y | Average of Y values | ȳ = Σyi / N | Baseline for deviations |
| Cross-product sum | Total co-deviation | Σ(xi−x̄)(yi−ȳ) | Core quantity for covariance |
| Population covariance | True covariance for full population | Σ(xi−x̄)(yi−ȳ) / N | Use when data is the whole population |
| Sample covariance | Estimate from a sample | Σ(xi−x̄)(yi−ȳ) / (N−1) | Reduces bias when estimating |
Quick Steps
- Paste your X values and Y values (must be the same length).
- Select sample or population covariance based on your use case.
- Click Calculate to view covariance and the full cross-product table.
- Export the table to CSV if you need it for a report or spreadsheet.
Interpretation: positive covariance means X and Y tend to move in the same direction; negative means they tend to move in opposite directions.
Your covariance history will appear here after you calculate.