Covariance Calculator
The Covariance Calculator takes two equal-length data lists and returns both the population covariance (divided by n) and the sample covariance (divided by n minus 1), showing how the two variables vary together.
What this calculator does
The Covariance Calculator estimates your result instantly from the values you enter, using standard statistics formulas. The Covariance Calculator takes two equal-length data lists and returns both the population covariance (divided by n) and the sample covariance (divided by n minus 1), showing how the two variables vary together. Calculations run in your browser, so nothing you type is sent to a server, and the output is an estimate rather than a certified or official figure.
Result
About Covariance Calculator
Enter two matching lists of numbers and this tool measures how they vary together by computing their covariance. It reports both the population version, which divides by the count, and the sample version, which divides by one less than the count.
A positive covariance means the variables tend to rise together, while a negative one means they tend to move in opposite directions.
Formula & Mathematical Calculation
Population Covariance = f(X values (comma-separated), Y values (comma-separated))
Calculated according to standard stats formulas implemented in the calculator core.
Calculation Example
For X = 1, 2, 3 and Y = 4, 5, 7, the means are mx = 2 and my = 16 ÷ 3 = 5.333333. The sum of products of deviations is (1−2)(4−5.333333) + (2−2)(5−5.333333) + (3−2)(7−5.333333) = 1.333333 + 0 + 1.666667 = 3.
The population covariance is 3 ÷ 3 = 1 and the sample covariance is 3 ÷ 2 = 1.5.
Key Benefits
- Returns both population and sample covariance from one entry
- Shows how two paired variables vary together, with sign and size
- Handles any equal-length pair of comma-separated data lists
- Distinguishes the divide-by-n and divide-by-(n-1) conventions
How to Use this Calculator
-
Enter X values
Type the first variable's values into the X values field, separated by commas. -
Enter Y values
Type the second variable's values into the Y values field, matching the count of X. -
Calculate
Press Calculate and read the Population Covariance and Sample Covariance boxes.
Assumptions & Limitations
What the calculation assumes
- Every value you enter is treated as an exact, known amount.
- Any rate or interval you enter is assumed to hold for the whole period unless the form asks for it separately.
- Results use standard published formulas and account only for the values entered above.
- Rounding is applied for display; the underlying calculation uses your full precision.
- Results are returned in the same units you enter, unless the tool states the output unit.
What it does not cover
- Covariance Calculator produces a calculated result for reference and learning, not a certified or official measurement.
- Real-world outcomes differ when tolerances, rounding rules or local standards apply.
- Definitions and standards vary by region and change over time; verify the convention that applies to your case.
- Figures are only as accurate as the inputs you supply — check them before acting on the result.
- For work where the result carries real consequences, confirm it against an authoritative source.
Frequently Asked Questions
Free to use, no account needed. Calculations run in your browser, so nothing you type is sent to a server. Results are estimates — how we build and check our calculators.