Portfolio Rebalancing Calculator
Estimate whole share purchases that allocate new cash toward portfolio target weights.
Earlier editorial review
- Reviewed
- 2026-09-21
- Methodology
- 1.1
Sources
How it works
Enter a ticker, current shares, a current price, and a target percentage for each holding. Add the new cash contribution. Prices can be entered manually or fetched as current quotes. All prices and amounts must use the same currency because the tool does not convert currencies.
The calculator values the holdings, adds the new contribution, and calculates target dollar values. It sorts positive shortfalls from largest to smallest, then allocates whole shares while the purchase fits the shortfall and remaining cash. The purchase table shows share counts, estimated costs, and leftover cash.
In the worked example, the 12,000 modeled portfolio has target values of 7,200 and 4,800. At prices of 100 and 80, the tool suggests 12 and 10 shares respectively. Whole share rounding can leave the result away from target.
Check ticker identity, price currency, share counts, targets, and contribution before using the estimate. Quotes are not guaranteed execution prices. The calculator does not place trades or account for fees, taxes, settlement, or price changes.
Step by step
- Enter holdings, target weights, prices, and new cash.
- Check the target total and review the proposed whole share purchases.
- Adjust an input to compare another scenario.
Worked example
Suppose a portfolio has 60 shares of STOCK priced at 100 and 50 shares of BOND priced at 80. Their target weights are 60 percent and 40 percent. Current value is 10,000. Enter a new cash contribution of 2,000, so the modeled total becomes 12,000.
The target values are 7,200 for STOCK and 4,800 for BOND. Their shortfalls are 1,200 and 800. The model returns purchases of 12 STOCK shares and 10 BOND shares, using all 2,000. These inputs reproduce the calculation in the tests. Other prices can leave cash unused because only whole shares are purchased.
When to use this calculator
Use this calculator to estimate how a new contribution could be split among holdings with stated target weights. It is useful when all holdings have same currency prices and whole share purchases are the intended unit.
Decide on the target allocation separately. This calculator does not assess risk tolerance, investment suitability, tax effects, or whether an account should be rebalanced.
Common input errors
Enter the number of shares owned, not the total position value, in the shares field. Enter a price for every row and confirm that quote currencies match the displayed currency. A missing or mismatched price prevents a valid purchase estimate.
Check that targets total 100 percent within the stated tolerance. Review unallocated cash and estimated weights. The greedy order can leave cash unused even when a different combination of whole shares could use more.
Calculation
CurrentValue = Σ(sharesᵢ × priceᵢ)
PortfolioAfterContribution = CurrentValue + NewCash
TargetValueᵢ = PortfolioAfterContribution × TargetWeightᵢ / 100
Shortfallᵢ = TargetValueᵢ − CurrentValueᵢ
SharesToBuyᵢ = min(floor(Shortfallᵢ / Priceᵢ), floor(RemainingCash / Priceᵢ))
Positive dollar shortfalls are sorted from largest to smallest. Each purchase is limited by the shortfall and remaining contribution. The model uses whole shares and does not include trading costs, taxes, price movement, or fractional shares.
Assumptions and limits
This model allocates new cash only. It never sells, does not optimize across every whole share combination, and does not guarantee that the resulting weights equal the targets. Every holding needs a price. Prices must share one currency, and no conversion is made. The estimate excludes fees, taxes, spreads, settlement rules, price changes, and fractional shares.
Key terms
- Target weight
- Target weights are percentages of the portfolio value after adding the new contribution.
- Dollar shortfall
- A shortfall is target dollar value minus the current dollar value of a holding.
- Buy only allocation
- The buy only rule sorts positive shortfalls from largest to smallest and purchases whole shares within the contribution.
Compare related questions
Compare the proposed purchases with ETF Overlap to inspect duplicate fund holdings. Portfolio Beta and Maximum Drawdown show other characteristics of an allocation, while this calculator only translates chosen targets into whole share purchases.
When new cash cannot close a gap, compare the current and target allocations before considering other changes. This page does not decide whether a target mix or any transaction is appropriate.
FAQ
What does portfolio rebalancing mean?
Rebalancing compares current portfolio weights with target weights. This calculator models purchases funded by a new cash contribution. It does not sell holdings or determine whether the target allocation suits an investor.
How does the purchase list work?
The model adds the contribution to the current portfolio value, calculates each target value, and finds each holding's dollar shortfall. It sorts positive shortfalls from largest to smallest, then buys the whole shares that fit both the shortfall and remaining cash.
Does the result find the mathematically closest portfolio?
It is a buy only, greedy allocation rule. After each purchase, the next largest shortfall is considered. The model does not search every possible combination of shares, sell an overweight holding, or guarantee the closest achievable allocation.
How closely must target weights total 100 percent?
Targets must add to 100 percent within a tolerance of 0.01 percentage points. For example, values summing to 99.995 percent pass. A cash holding must be entered as its own row if it has a target weight.
Can the calculator buy fractional shares?
No. The calculator rounds each purchase down to whole shares. If the remaining contribution cannot buy another share at the next holding's price, the remainder is shown as unallocated cash. Fractional shares are not modeled.
Related tools
ETF Overlap compares fund holdings, while Portfolio Beta and Maximum Drawdown describe other portfolio measures. These tools answer different questions from this whole share purchase estimate.