Portfolio Covariance and Risk Contribution Calculator
Use matched asset return histories to calculate sample covariance, portfolio volatility and variance contributions.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Build the n−1 sample covariance matrix and evaluate the weighted quadratic form. Attribute portfolio variance using each weight times its covariance with the portfolio.
Variance=wᵀCw; asset contribution=w_i(Cw)_i; annual SD=√variance×√frequency
Worked example
Equal weights in perfectly opposite +10/−10 return series have zero portfolio sample volatility, despite nonzero individual volatility.
Assumptions and input details
2–8 assets, 2–500 matched observations each, long-only weights summing to 100%. All return series must use the same intervals and currency basis. Contribution fractions can be negative for a diversifying asset and are undefined when total variance is numerically zero. Annual scaling assumes independent comparable periods. Matrix entries are percentage-points squared per observation. No live market data or national tax rules are inferred. Enter consistent amounts in one currency unless explicitly stated otherwise.
References: CFA Institute: risk-adjusted performance measures
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Compare an entered two-asset mix with the minimum-variance long-only mix under entered risks and correlation.
Compare arithmetic and geometric periodic returns with sample and conventionally annualized volatility.
Add balances in different currencies, including debts. Convert the total and compare a table and currency chart.
Reserved advertising space.