ComputeYard

The math, explained. Every formula shown, every result tested.

Portfolio Rebalancing Calculator

Enter your holdings and target weights and see exactly what to buy and sell to get back to your target allocation, including how to deploy a new contribution.

Educational estimate only, not investment, tax, or financial advice or a recommendation to buy or sell any security. Investing and options involve risk of loss; verify independently. By using this tool you accept our Terms and Disclaimer.

How it works

Over time, winners grow and losers shrink, so your portfolio drifts away from its target mix. Rebalancing sells what's overweight and buys what's underweight to restore your intended risk. This calculator shows each holding's current vs target weight, the drift, and the exact trade needed.

Any new contribution is added to the total first, then spread across holdings by target weight, so fresh cash is allocated efficiently. Target weights must sum to 100%.

Worked example

Portfolio of $10,000: $7,000 stocks, $2,000 bonds, $1,000 cash, with targets 60% / 30% / 10%:

  • Target values: stocks $6,000, bonds $3,000, cash $1,000.
  • Trades: sell $1,000 stocks, buy $1,000 bonds, cash unchanged.

The formula

total_after  = sum(current values) + new contribution
target_value = total_after × target_weight
drift        = current_weight − target_weight
trade        = target_value − current_value   (+ buy / − sell)

FAQ

Do target weights need to add up to 100%?
Yes, the calculator requires the targets to sum to 100%.
How is a new contribution handled?
It's added to the total before targets are computed, so new cash is allocated by target weight.
What does a negative trade mean?
Sell that amount; a positive trade means buy.

Related calculators

All calculators →

Embed this calculator on your site (free)

Paste this HTML where you want the calculator to appear. It loads live from ComputeYard, stays up to date automatically, and includes a link back.