Efficient Frontier Calculator
Find the exact long-only minimum-variance portfolio, maximum-Sharpe portfolio and minimum-risk weights for a target return using two or three assets.
Efficient frontier results
| Portfolio | Asset A | Asset B | Asset C | Return | Volatility | Sharpe |
|---|
| Expected return | Volatility | Asset A | Asset B | Asset C |
|---|
Efficient frontier and portfolio optimization formulas
Portfolio return: E(Rₚ) = ΣwᵢE(Rᵢ)
Portfolio variance: σₚ² = wᵀΣw
Sharpe ratio: (E(Rₚ) − Rf) ÷ σₚ
For each target return, the calculator minimizes variance subject to weights totaling 100%, nonnegative weights and the selected target return. With two or three assets, every solution is computed from the exact quadratic minimum on the feasible line segment; the chart does not use random portfolios or a coarse weight grid.
Verified example
Using expected returns of 8%, 12% and 6%; volatilities of 10%, 18% and 6%; correlations of 0.30, 0.10 and 0.20; a 3% risk-free rate; and a 9% target produces a reproducible long-only frontier. The result table reports the exact weights, expected return, volatility and Sharpe ratio for the global minimum-variance, maximum-Sharpe and target portfolios.
How to use the calculator
- Choose two or three assets and enter compatible expected returns and volatilities.
- Enter correlations measured from the same return series and interval.
- Enter a risk-free rate for the same interval and a feasible target return.
- Compare the minimum-variance, maximum-Sharpe and target-return weights, then review the full frontier.
What the three portfolios mean
- Minimum variance: the lowest-volatility long-only combination, regardless of its expected return.
- Maximum Sharpe: the long-only combination with the greatest modeled excess return per unit of volatility.
- Target portfolio: the lowest-volatility combination that reaches the exact target return.
Limits and assumptions
- The calculator supports two or three risky assets. Weights are long-only, total 100%, and exclude leverage, short sales and a risk-free allocation.
- Expected returns and the risk-free rate range from −100% through 1,000%. Volatilities must be greater than 0% and no more than 1,000%. Inputs support up to six decimals.
- The correlation matrix must be positive definite. Perfect correlations of +1 or −1 and singular three-asset matrices are rejected because they do not define a unique stable optimizer.
- The risk-free rate must be lower than at least one expected return so that a positive maximum-Sharpe portfolio exists.
- Mean-variance optimization is highly sensitive to estimated returns, volatility and correlation. Historical inputs can change and do not guarantee future results.
- The tool excludes taxes, fees, liquidity, lot sizes, estimation error, non-normal returns and investor suitability. It is educational, not investment advice.
Important: an optimizer can produce precise weights from imprecise assumptions. Stress-test the inputs and compare the result with practical constraints before using any allocation.
Frequently asked questions
Is the efficient frontier the same as portfolio variance?
No. Portfolio variance measures risk for one chosen set of weights. The efficient frontier searches all feasible long-only weights and keeps the minimum-risk portfolio for each attainable return.
Does maximum Sharpe mean maximum return?
No. Maximum return generally concentrates in the highest-return asset. Maximum Sharpe balances modeled excess return against volatility.
Why can optimized weights change so much?
Small changes in expected returns, volatility or correlations can move the mathematical optimum. That sensitivity is a limitation of mean-variance optimization, not a software error.
Related calculators
- Portfolio Variance Calculator — measure risk for weights you already chose.
- Portfolio Rebalancing Calculator — turn target weights into buy and sell amounts.
- Sharpe Ratio Calculator — evaluate risk-adjusted return from summary inputs.
- Portfolio Beta Calculator — estimate market sensitivity from holding weights.