b2KIT

Portfolio Rebalancing Calculator

Calculate exact buy/sell amounts to rebalance portfolio to target allocation with tax-lot aware suggestions and drift alerts.

Tested tool guide Tested browser tools Checked August 16, 2026

What Portfolio Rebalancing Calculator does, with a checked example

Enter your current holdings and the allocation you want, and this calculator returns the exact dollar amounts to buy and sell so each asset lands on its target percentage. Overweight positions are paired with underweight ones, so sells fund buys and the total stays put, and positions that drift past a tolerance you set are flagged for attention. What surprises most people: rebalancing usually means selling something that went up and paying tax on the gain, and the lot-level suggestions matter more than the headline numbers.

Worked example

A concrete input and expected output from the current implementation.

Input

Portfolio total: $100,000
Target allocation: 50% stocks, 30% bonds, 20% cash
Current holdings: stocks $62,000, bonds $25,000, cash $13,000

Expected output

Sell stocks: $12,000
Buy bonds: $5,000
Buy cash: $7,000

After the trades: stocks $50,000 (50%), bonds $30,000 (30%), cash $20,000 (20%). Sells total $12,000, buys total $12,000.

Stocks are $12,000 above their 50% target while bonds sit $5,000 below and cash $7,000 below. The single overweight funds both underweights, so the trades net to zero: 5,000 + 7,000 = 12,000, matching the sale exactly.

How the result is produced

1

Allocation deltas

Each holding is measured against its target share of the total portfolio, and the difference becomes a dollar delta. Assets above target generate sell amounts; assets below generate buy amounts. The calculator pairs the two sides so total sells equal total buys, meaning the portfolio value stays unchanged and every dollar of a sale funds a purchase elsewhere.

2

Tax-lot suggestions and drift alerts

When a sale is required, the tool works from the cost basis you provide for each lot, so you can order a sale to keep realized gains smaller or larger on purpose. Separate from that, it compares every position against its target and alerts on holdings that have moved beyond the tolerance you set, so you catch drift before it becomes a large, lumpy trade.

Good uses

  • Before year-end, when one equity position has run far past its target and you want to see the smallest-gain lots to sell to fund the rebalance.
  • At a scheduled quarterly review, when you want a standing list of which holdings have drifted past your tolerance and the exact order amounts to place.
  • After a bonus or dividend payout, when you want new contributions routed only to underweight assets instead of buying everything proportionally.

Limits and checks

  • The output is only as trustworthy as the inputs: if the percentages you enter do not sum to 100%, or the position values are stale, the buy and sell amounts will not reconcile and the calculator cannot detect why.
  • The dollar amounts are trades, not tax estimates. In a taxable account the sale realizes a capital gain or loss that lands on your return, so the lot chosen and your marginal rate determine the actual tax effect.
  • The result is a snapshot. Prices move between the calculation and execution, so the trades that are placed will not produce exactly the target allocation, and one round of rebalancing does not end drift forever.

Common questions

Can I rebalance without selling anything?

Only with new money. If you are adding cash, the calculator can direct the contribution to underweight assets until they reach target, no sales needed. With no new money, every purchase must be funded by a sale, and the overweight assets are the only source of funds, so selling is unavoidable.

Should I always sell the highest-cost lots to minimize tax?

Not always. Selling the highest-cost lots shrinks the realized gain today, but it leaves lower-basis shares that will realize larger gains later, and if you buy back a substantially identical security within 30 days, the wash-sale rule disallows the loss for now and defers it into the replacement shares' basis. Weigh the lot suggestion against your own tax situation before executing.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools