Browser-based finance tool · no market data, no account, nothing uploaded

Portfolio Rebalancer

Enter what you hold, the price of each holding, and the weight you want. The tool works out which holdings to buy and sell to get there, with options for contribute-only (no sells), a drift band, a minimum trade size and whole or fractional shares. Prices are exactly what you type; nothing is fetched from a market feed.

Planning arithmetic only, not investment advice. Taxes, fees, spreads and settlement are not modelled, so check a sell against your own tax position first.

Holdings

Ticker, units you own, price per unit and target %.

TickerUnitsPriceTarget %Remove

Targets add up to 100%.

Settings

Method
Portfolio now
$40,600.00
Buy
$5,700.00
Sell
$3,700.00
Net cash used
$2,000.00
Cash left over
$0.00

Trade list (3)

Sells come first so their proceeds can fund the buys.

ActionTickerUnitsPriceValue
SellVTI14.8$250.00$3,700.00
BuyVXUS13$60.00$780.00
BuyBND68.3333$72.00$4,920.00

Before and after

0%18%35%53%70%VTI61.6%50.0%VXUS29.6%30.0%BND8.9%20.0%
BeforeAfter the tradesTarget

Every holding

TickerNowTargetDriftAfter
VTI61.6%50.0%+11.650.0%
VXUS29.6%30.0%-0.430.0%
BND8.9%20.0%-11.120.0%

Portfolio Rebalancing Calculator

Operator: Abdulla Al Fahad. How tools are built and checked

A portfolio drifts. Equities rise faster than bonds, one fund doubles, and the 50/30/20 split you chose a year ago is now 57/27/16. Putting it right is mostly arithmetic: work out what each holding should be worth, compare it with what it is worth, and turn the difference into units to buy or sell. The arithmetic is simple, but it gets fiddly once you add cash, a no-selling rule, whole shares and a minimum trade size, and that is where a spreadsheet tends to fall apart.

This calculator does that arithmetic from numbers you type. Enter each holding's ticker, the units you own, a price per unit and a target percentage, add or withdraw cash if you wish, and it produces a trade list with sells first. It can rebalance fully, or use only new money without selling anything, ignore holdings that are still within a drift band, skip trades below a minimum size, and round to whole shares. There is no market data feed and no account link; the prices are the ones you type.

Key features

  • Holdings entered in a table or opened from a CSV with ticker, units, price and target columns
  • Full rebalance (buy and sell) or contribute-only mode that spends new cash on the most underweight holdings and never sells
  • Cash to add, or a negative amount to withdraw and have the sells sized to raise it
  • Drift band in percentage points, with the option to leave holdings inside the band alone
  • Minimum trade value, and whole shares or fractional units to a chosen number of decimals
  • Before-and-after allocation chart, a full holdings table, and CSV and XLSX downloads

Full and contribute-only plans, drift bands and whole-share rounding

Targets are percentages of the whole portfolio and are scaled to 100 if they add up to something else, with a note. The portfolio value is the sum of units times price. In a full rebalance the target value of each holding is its share of the portfolio plus any cash you add, or minus any you withdraw; the trade is the difference between that and the current value, divided by the price to give units. Because the targets sum to 100% the buys and sells net out to the cash movement exactly, apart from rounding.

Contribute-only mode answers a different question: where should new money go so the portfolio moves toward its targets without selling? It does not simply top each holding up to its target, because when some holdings are overweight the cash is not enough to do that. Instead it raises the holdings with the lowest value relative to their target until the cash is spent, so they converge on the same ratio. Holdings above their target are left alone and stay above it. The page warns when that is still the case and says that a bigger contribution, or a full rebalance, would fix it. A withdrawal is refused in this mode, since it cannot sell.

A drift band measures how far each weight sits from its target in percentage points. With a band of 5, a holding at 33% against a 30% target is inside it, one at 36% is outside. By default the band only labels each holding; if you tick Leave holdings inside the drift band alone, those holdings are excluded from trading, their value is subtracted from the portfolio, and the rest is rebalanced to its own targets scaled to fill what remains. If every holding is inside the band, nothing is traded and added cash stays as cash.

A minimum trade value removes small trades; the cash they would have used or raised stays as cash and a note lists the holdings skipped. In whole-share mode buys are rounded down and sells to the nearest share, a plan that would overspend is trimmed, and any cash left is then spent one share at a time on the holding furthest below its target while the shortfall is more than half a share. A withdrawal sells extra shares until at least the amount asked for is raised. Fractional mode rounds units to 0 to 6 decimals, 4 by default, and a sell never exceeds what you own.

How it works

The plan is recomputed whenever an input changes. It first checks the inputs, flagging a missing or zero price, negative units or targets, or an empty portfolio with nothing to invest, then computes target values, then ideal units, then applies the whole-share, minimum-trade and cash-limit rules, and finally reads off weights before and after. All the figures on the page, in the CSV and in the XLSX Trade list sheet come from that one result.

The XLSX has two sheets. Trade list holds the page's result as values, along with a line recording the settings used. Live rebalance holds the units, prices and targets as editable cells and recomputes a plain full rebalance with formulas, so you can try other numbers in the spreadsheet. It does not apply the no-sell mode, drift band, minimum trade or whole-share rules, and says so at the top.

Common use cases

  • Splitting a monthly 2,000 contribution across three funds so the weights move toward the targets without selling anything
  • Working out the trades for an annual rebalance of a taxable account where you want to see the sell amounts before deciding
  • Raising 4,000 in cash from an overweight holding and having the sells chosen to restore the targets
  • Planning a whole-share rebalance of a small account where one fund's share price is large relative to the account

How to use this tool

  1. Enter each holding's ticker, units owned, price and target percentage, or open a CSV. The sample shows three funds.
  2. Type the cash to add, or a negative number to withdraw, and choose full rebalance or contribute only.
  3. Optionally set a drift band, a minimum trade value, and whole or fractional shares.
  4. Read the trade list, with sells first, and the before and after chart.
  5. Download the CSV, or the XLSX if you want to keep experimenting in a spreadsheet.

Example

Three funds, 5,000 of new cash, full rebalance, fractional units

VTI   100 units at 250   target 50%   (value 25,000)
VXUS  200 units at  60   target 30%   (value 12,000)
BND    50 units at  72   target 20%   (value  3,600)
Portfolio 40,600 + cash 5,000 = 45,600

Trade list, then the same funds contribute-only with 3,000

Sell  VTI   8.8 units   2,200
Buy   VXUS 28 units      1,680
Buy   BND   76.667 units  5,520
After: 50% / 30% / 20%

Contribute-only, 3,000: buy BND 41.667 units (3,000)
After: VTI 57.3%, VXUS 27.5%, BND 15.1%
VTI stays above target because nothing is sold

Tips for best results

  • Use contribute-only mode when selling would trigger tax or fees, and let new money do the rebalancing over several months.
  • Set a drift band of 3 to 5 points and tick the freeze option for an account where you want to trade only when something has moved enough to matter.
  • Set a minimum trade at a level where the fee or the effort would exceed the benefit, such as 50 or 100.
  • For whole shares, expect some cash to be left over, up to roughly the price of your most expensive underweight holding.
  • Update the prices before every run. The plan is exact for the prices you type, and stale prices produce stale trades.

Common pitfalls

This is arithmetic, not advice. It does not know your tax position, fees, bid-ask spreads, wash-sale rules or settlement timing, and a sell it suggests may have a tax cost.

Prices move between the moment you type them and the moment you trade. The units are right for the price you entered, and the actual weights after trading will differ a little.

Targets by value ignore cash already sitting in the account unless you include it as a holding with its own target, for example a CASH row priced at 1.

Contribute-only mode can leave overweight holdings overweight for a long time if contributions are small relative to the portfolio.

Common errors and how to fix them

"type a price above zero"
Each holding needs a price. Fill it in, even for a holding you plan to leave alone, because its value counts towards the total.
"Contribute-only mode never sells"
You entered a negative cash amount. Switch to full rebalance to raise cash, or enter a positive contribution.
"The targets add up to X%"
This is a note, not an error: the targets are scaled to 100%. Edit them if the scaled values are not what you meant.
"could not be invested in whole shares"
The leftover is smaller than the price of any underweight holding. Switch to fractional shares, add a little more cash, or accept it as cash.

Best practices

  • Rebalance on a schedule or on a band, not on impulse, and write the rule down before the market moves.
  • Check each sell against your tax situation before acting on it, and prefer new money where you can.
  • Keep the CSV from each run as a record of the prices and weights you used.

Why prices are typed rather than fetched

A rebalancing tool that pulls quotes needs a data provider and an account of some kind. This one does neither: it works from the numbers in the table, so there is no licence or data feed that can fail. The cost is that you supply current prices, which for a handful of funds takes a minute.

Because of that, the same inputs always produce the same trade list, which makes the plan easy to check by hand.

Frequently asked questions

Does it connect to my brokerage?

No. It takes the units and prices you type or import, and returns a trade list. Nothing is linked and nothing is uploaded.

What does contribute-only mean?

New cash is spent on holdings that are below their targets, lowest first, and no holding is sold. Overweight holdings stay as they are.

How do I include cash as an asset?

Add a row called CASH with its balance as the units, a price of 1, and the target percentage you want to hold.

Why does the XLSX have two sheets?

Trade list is the page's result under your settings. Live rebalance is a formula sheet for a plain full rebalance, so you can try different numbers in the spreadsheet.