Cernarus

Portfolio Standard Deviation Calculator

This calculator computes portfolio standard deviation from user-supplied weights and risk inputs. It supports a closed-form two-asset formula for quick checks and a matrix-based workflow for portfolios of arbitrary size (upload or paste CSV matrices). Use the two-asset method for simple portfolios and matrix methods when you have covariance or correlation data.

The tool returns portfolio variance and the square root of variance (standard deviation). It includes guidance on annualization, numeric accuracy, input validation, and operational limits. Results are indicative and depend entirely on the quality of the input data.

Updated Nov 21, 2025

Direct formula for a portfolio of two assets using weights, individual standard deviations, and their correlation.

Inputs

Advanced inputs

Two-asset inputs

Matrix inputs

Correlation + SDs inputs

Results

Updates as you type

Portfolio standard deviation (two-asset)

13.65%

OutputValueUnit
Portfolio standard deviation (two-asset)13.65%%
Primary result13.65%

Visualization

Methodology

Two-asset closed form: Uses the exact algebraic formula var_p = w1^2 σ1^2 + w2^2 σ2^2 + 2 w1 w2 ρ12 σ1 σ2. SD is sqrt(var_p).

N-asset matrix: Accepts a covariance matrix Σ and weight vector w, computes portfolio variance as w' Σ w (a quadratic form). SD is sqrt(w' Σ w).

Correlation workflow: If you supply a correlation matrix and per-asset standard deviations, the calculator converts correlation to covariance by cov_ij = corr_ij * σ_i * σ_j, then applies the quadratic form.

Annualization: If inputs are period-level (e.g., daily returns), convert to annual SD by multiplying period SD by sqrt(periods_per_year). Ensure all inputs use the same periodicity before comparison.

Worked examples

Example (two-asset): w1=0.6, w2=0.4, σ1=0.15, σ2=0.20, ρ12=0.2 → compute var_p and SD_p using the two-asset expression;

Example (matrix): weights_csv = 0.5,0.5; cov_csv = 0.0225,0.003;0.003,0.04 → parsed into vector and 2x2 matrix, compute w'Σw and then sqrt() for SD.

Key takeaways

Use the two-asset method for quick, exact calculations when you have two assets. Use matrix methods for portfolios with many assets.

Ensure input consistency (periodicity, units) and check matrix validity. The accuracy of results is governed by input quality, numeric stability, and floating-point arithmetic limits.

Further resources

Expert Q&A

Do weights need to sum to 1?

For portfolio-level standard deviation, weights should normally sum to 1. If they do not, the calculated standard deviation scales with exposure. The tool accepts any weights but recommends normalizing them if comparing portfolios.

Should I provide covariance or correlation?

Both are acceptable. If you only have correlations, provide per-asset standard deviations so the tool can convert correlations to covariances. If you have covariances already, provide them directly.

How do I annualize the result?

If your input SDs are per-period (for example, daily), multiply the resulting SD by sqrt(periods_per_year) where periods_per_year is typically 252 for trading days or 12 for months. Ensure consistency of input periodicity.

How accurate are the results?

Numerical accuracy depends on input precision, matrix condition, and floating-point arithmetic. For very large or ill-conditioned covariance matrices, rounding error can be material. See accuracy caveats and standards below.

What are common failure modes?

Common issues include malformed CSV input, mismatched matrix dimensions, non-numeric entries, and correlation matrices that are not positive semi-definite. The tool validates dimensions and basic numeric content but cannot correct fundamentally inconsistent data.

Sources & citations