StockAvg

Portfolio Rebalance Calculator

Give each holding a name, what it is worth today, and the share of the portfolio you want it to be. This page answers two questions from those three columns, and it answers them at the same time. The first is the one every rebalancing tool answers: with no new money going in, what does each row have to buy or sell to land on its target. The second is the one this page is built around, and it runs the other way: what is the least new cash that has to go in before no row has to be sold at all. Every row is printed with the cash it would need on its own, so you can see which holding is setting the number rather than being told it. Type a price a share as well and every dollar figure becomes whole shares, with the cash those shares cannot reach printed alongside. No account, no email gate, no prices fetched: every figure on this page was typed by you.

What you hold, and where you want it

Asset Value now Target % Price a share
New cash to put in (optional) Leave it empty and you get the ordinary buy and sell plan with no new money. Put a figure in and the plan is rebuilt around that cash. Put in the figure the box below prints and every sell line disappears.

How the cash figure is worked out

Start from one row on its own and ask what the whole portfolio would have to be worth for that row to sit exactly on its target with nothing sold. A row worth 9,000.00 with a target of 60% is on target when 9,000.00 is 60% of the total, and that happens when the total is 9,000.00 divided by 60%, which is 15,000.00. Anything less than 15,000.00 and that row is above 60%, so it has to be sold. Anything more and it is below target, so it can be bought.

Do that for every row and each one produces its own figure. The rows that are already below target produce a figure smaller than the portfolio is worth now, which means they ask for nothing. The rows that are above target produce a figure larger than the portfolio is worth now, and the difference is the cash that row needs. The cash the whole portfolio needs is simply the largest of those, because the moment the largest one is satisfied every other row is satisfied too.

For each row: portfolio size this row needs = value now / target share
Cash this row needs on its own = that size minus the portfolio value today
Cash the portfolio needs = the largest of those, and never less than 0
After the cash goes in: target value of a row = (value today + cash) × target share
What that row does = target value minus value now, positive is a buy and negative is a sale

Here it is with the numbers used all the way down this page, and every line below is printed under the result with your own figures in it: US stocks worth 9,000.00 aimed at 60%, bonds worth 3,000.00 aimed at 40%, so the portfolio is worth 12,000.00 today.

US stocks: 9,000.00 / 60.0000% = 15,000.00, so this row needs 15,000.00 - 12,000.00 = 3,000.00
Bonds: 3,000.00 / 40.0000% = 7,500.00, which is less than 12,000.00, so this row asks for nothing
The largest is 3,000.00, from US stocks, so that is the cash that has to go in
Put 3,000.00 in and the portfolio is worth 15,000.00
  US stocks target value = 15,000.00 × 60.0000% = 9,000.00, no trade, it is already there
  Bonds target value = 15,000.00 × 40.0000% = 6,000.00, buy 3,000.00
Total to sell = 0.00

So the answer to the reverse question is 3,000.00 on this portfolio, and the row that produced it, US stocks, is the row that ends up doing nothing at all. That is not a coincidence and it is worth dwelling on, because it is the part that makes the figure checkable.

The same two rows under no new cash and under the cash that avoids selling Two panels. On the left, with no new cash, stocks are shown above target and bonds below, with an arrow moving 1,800.00 from stocks to bonds. On the right, with 3,000.00 of new cash, the portfolio grows so that stocks sit exactly at target and the whole 3,000.00 goes into bonds. No new cash: 1,800.00 moves from one row to the other portfolio stays at 12,000.00 stocks 7,200.00 (60%) bonds stocks 9,000.00 (75%), 1,800.00 above target sell 1,800.00 stocks 7,200.00 (60%) bonds bonds 3,000.00 (25%), 1,800.00 under target bonds 4,800.00 (40%), at target Add 3,000.00: nothing is sold, and both rows land on target portfolio becomes 15,000.00, which is 9,000.00 / 60% stocks 9,000.00 (60%), untouched bonds 6,000.00 +3,000.00

The same two rows, two ways. Above, with no new money, 1,800.00 has to come out of the row that ran ahead and go into the row that fell behind. Below, 3,000.00 of new money makes the portfolio big enough that the row which ran ahead is already sitting exactly on its target, so nothing comes out of it.

The row that sets the number buys nothing

This is the detail that makes the figure trustworthy rather than magic, and it is the quickest way to check it by hand. The row that produces the largest requirement is the row that is furthest above its target in the only sense that matters here, and it is the row the whole calculation is built to satisfy exactly. When the cash lands, that row is precisely on target, so it buys nothing and sells nothing. Every other row is below target at that point, so every other row buys.

In the example, US stocks set the 3,000.00 and then buy 0.00, while bonds take the entire 3,000.00. If you ever see the row named in the second box appear with a buy or a sale against it, the cash typed in is not the cash the box printed, and the note under the result says which side of it you are on.

It also tells you something useful before you commit anything. The row that sets the number is the row that is holding your portfolio away from its target, and it is the one row that adding money cannot help. Adding more than the printed figure does not change which row binds, it only makes every other row buy more.

Half way: what happens with cash that is not quite enough

Most people do not get to choose the figure, they have a paycheck or a contribution of a size somebody else decided. So the page takes whatever cash you type and rebuilds the plan around it, and the useful part is that the selling does not switch off all at once. It shrinks.

On the same portfolio, 3,000.00 is the figure that stops all selling. Put in 1,500.00 instead, half of it, and the row that ran ahead only has to give up 900.00 rather than 1,800.00, with 2,400.00 going into the row that fell behind. Put in nothing at all and it is the full 1,800.00. The selling falls towards zero as the cash climbs towards the printed figure, and it reaches zero exactly there.

That gradient is the practical reason the two questions belong on one page. The buy and sell plan tells you what a rebalance costs in trades today. The cash figure tells you what the same rebalance would cost in new money instead. Having both, from the same three columns, means the choice between them is a real choice rather than a guess at two separate tools.

Whole shares, and the money they cannot reach

Add a price a share to a row and the page stops speaking only in dollars. A row told to buy 1,800.00 at 68.00 a share becomes 26 shares, because 26 is the whole number of shares 1,800.00 reaches, and 27 would cost more than the row was told to spend. The 32.00 left over is printed on its own, row by row and as a total.

That remainder is not an error to be rounded away, it is the actual position. After buying whole shares the row is worth 1,768.00 more than it was, not 1,800.00 more, so the portfolio is a little off target and 32.00 is sitting in cash. A page that quietly spent 1,836.00 would be telling you to buy shares you may not have the money for, and a page that ignored the gap would be describing a portfolio you do not have.

Sales are cut downwards for the same reason and in the same direction: 1,800.00 of selling at 150.00 a share is 12 shares, and the row stays a touch heavier than the target rather than a touch lighter. Nothing on this page ever rounds you into a bigger trade than the arithmetic supports.

A row aimed at zero per cent

Sometimes the target for a holding is nothing at all, because the point of the exercise is to get out of it. That case has no cash answer, and the page says so instead of printing a number that would be wrong.

Dividing by a target of 0% is not a large number, it is no number at all: there is no portfolio size at which 2,000.00 is 0% of it. No amount of new money brings a row down to nothing, because new money makes the portfolio bigger, not the row smaller. So when a row has a target of 0% and still holds money, the page reports that a sale cannot be avoided, names the row, and carries on with the sum for the rest of the portfolio. What it will not do is offer a cash figure that quietly leaves the unwanted holding in place.

Why the cash figure is carried up and every other figure is cut down

One rule everywhere on this site is that nothing is rounded up, and this page keeps it, with a single stated exception that exists for a reason worth reading.

The cash figure is a floor to clear rather than a benefit to receive. A requirement of 1,666.6666 has to be printed to two decimals, and cutting it down to 1,666.66 would put the portfolio a fraction of a cent below the size the binding row needs. The binding row would then sit a hundredth above its target again, a sell line of 0.01 would reappear on exactly the row the page promised would be left alone, and the headline claim would be false by a cent. So that one figure is carried up to the next cent, and the page prints that it did.

Everything else still goes downwards. Money is shown to two decimals, shares and percentages to four, and each is cut off at that point. The consequence is visible in the last check line: after the rows take what they need, a cent or two of the cash added may belong to no row in particular, and it is printed as cash rather than being forced into a row that did not ask for it.

What this page does not decide

The arithmetic here is two sums, and the judgment around them is not on this page. It does not know and does not claim to know:

What this page cannot work out

A list of holdings with a value and a target each is the whole input. These things are outside it, with no box to put them in:

The same sum in a spreadsheet

Put the values in column A, the target percentages in column B, and the cash to add in D1. With the portfolio total in D2 as =SUM(A:A):

Target share of a row = =B2/SUM(B:B)
Cash this row alone needs = =MAX(0,CEILING(A2/(B2/SUM(B:B)),0.01)-D2)
Cash the portfolio needs = =MAX(C2:C20)
Target value after the cash = =($D$2+$D$1)*(B2/SUM(B:B))
Buy or sell = =that value minus A2, positive is a buy, negative is a sale

Two differences are worth knowing. A spreadsheet rounds when it displays a number but keeps the full value underneath, while this page cuts every figure down at the point shown, so on the same inputs the last decimal can differ. And the CEILING in the second formula is doing the same job as the exception described above: without it the cash figure lands a fraction short and the row that set it comes back with a small sale against it.

The same money, other questions

Rebalancing is one use of a target weight, and the others sit beside it. If the question is how big one position should be before you buy it at all, the position size calculator works that out from the risk you are willing to take on a single trade. If the same shares were bought at several prices and you want the pooled cost before any of this, the cost basis calculator puts them on one line. If a holding was bought again lower rather than sold, the average down calculator handles that sum, which is a different thing from rebalancing and not a substitute for it. To see what a regular fixed contribution does over time, the DCA calculator runs it period by period, and the dividend reinvestment calculator does the same for distributions that buy more shares. And if you want the growth rate behind the whole portfolio rather than its weights, the CAGR calculator works that out from a start value, an end value and the years between them.

Frequently asked questions

How much cash do I need to rebalance without selling?

Take each holding that is above its target, divide what it is worth by its target share, and take the largest of those results. That is the portfolio size at which the most over weight holding is exactly on target, and every other holding is below target at that point, so nothing has to be sold. Subtract what the portfolio is worth today and the difference is the cash. On the example on this page, 9,000.00 at a 60% target needs a 15,000.00 portfolio, against 12,000.00 today, so 3,000.00 of new cash removes every sell line.

Can I rebalance by only buying?

Yes, if the new money is at least as large as the figure this page prints. Adding cash makes the portfolio bigger, which pulls every weight down towards the rows that need to grow, and once the portfolio is big enough that the most over weight row is on target, every remaining row is below target and only buys are left. Below that figure, buying alone will not finish the job and some selling remains, and the page prints how much.

What is the 5/25 rule for rebalancing?

It is a threshold rule people use to decide when a portfolio has drifted far enough to be worth touching: look at a holding when it is 5 percentage points away from its target, or, for smaller holdings, when it has moved by 25% of the size of its target, and take the tighter of the two. A holding with a 40% target has a 5 point band, while a holding with a 10% target has a 2.5 point band, because the same 5 points matter more in a small allocation than in a large one. This page does not apply the rule for you. It works out what a rebalance would be from the targets you typed, whenever you decide to do it.

How should I rebalance my portfolio right now?

That depends on accounts and taxes this page cannot see, so here is the part it can do. Put each holding in with what it is worth today and the share you want it to be, and read the two plans: what a full rebalance costs in trades with no new money, and what the same rebalance costs in new money instead. If the selling in the first plan would realise gains you would rather not realise this year, the second plan is the one to look at, and the cash figure tells you exactly where selling stops. Whether to act today rather than next month is not a question this page has any input on.

What is the 70/30 portfolio strategy?

A two row target: 70% in one broad group of assets, usually equities, and 30% in another, usually bonds or cash, with the split chosen for the level of movement the investor is willing to sit through. On this page it is two rows with 70 and 30 in the target column, and because the targets add to 100% nothing is normalised. If equities have run to 78% of the portfolio, the page prints what a sale back to 70% looks like, and in the next box, the cash that would have to come in to make 78% into 70% without a sale.

Is portfolio rebalancing a good idea?

It is a way of keeping a portfolio at the risk its owner chose, rather than at the risk recent performance left it with, and whether that is worth the trades and the tax is a question about a particular person's accounts. This page takes no side. What it can do is make the cost of each side visible before the decision is made, which is the part usually guessed at: the number of dollars that have to move, and the number of dollars of new money that would move them instead.

What happens when you rebalance your portfolio?

In the arithmetic, one thing: value moves between rows until each row is the share of the whole you said it should be, and the total is unchanged if no new money went in. In the world, three other things happen that this page does not model. The trades may cost commissions or spreads. A sale in a taxable account can realise a gain or a loss, which is a tax event in that year. And the prices move again immediately, so the portfolio is only at target for the moment the trades settle. The first is invisible here, the second is a separate sum, and the third is not forecastable.

Does Warren Buffett rebalance his portfolio?

This page holds no information about any individual investor's own practice, and it will not state one. Nothing here tracks what any person or company holds, buys or sells, and no figure on this page comes from anyone's filings. If you want to know what a particular investor does, that has to come from their own published statements, not from a calculator.

This page is a calculator, not investment or tax advice. It applies no rebalancing rule, no drift threshold, no cost and no tax: the targets, the values and the cash are yours, and the two plans are worked out from those alone. There are no live prices and no broker connection. Contact: contact@stockavg.com