The calculator is a small set of formulas. They are deterministic. The same inputs always produce the same rungs. This lesson computes the first rungs of the default plan by hand, so you can see where each column comes from. The plan is an entry of 100, a step of 5%, arithmetic spacing, flat lots, a base lot of $1,000, and a sell level of 8%. These are made-up teaching inputs. Open that plan in the calculator and the table should match the figures below. If it does not, the page has a bug, not a mystery.
Nothing in the formulas is a forecast. A price of 95.00 is where the second buy would be if you wrote a 5% arithmetic step under an entry of 100. It is not a prediction that a name will trade there. The profit column is what the target identity produces if you later sell every share at average cost plus 8%. It is not an expectation.
Shares at the entry
The base share count is the base dollars divided by the entry, rounded down, and at least one. 1,000 divided by 100 is 10, exactly, so the floor does not change it. Flat lots repeat that count. Level 0 buys 10 shares, level 1 buys 10, level 2 buys 10, and so on, up to the number of levels you asked for, or until a cap stops it. Linear lots would instead multiply by the level index plus one: 10, 20, 30, 40.
If the entry had been 123.45 and the base $2,500, the base count would be floor(2500 / 123.45), which is 20. Linear lots would then be 20, 40, 60, and onward. The calculator uses that same rule. A base smaller than the entry becomes one share, because the floor of a fraction below 1 is zero and the worksheet refuses a zero-share rung. One share times a linear schedule is still a real ladder. It is just a thin one.
The buy prices
Arithmetic rung k is entry times (1 minus k times the step). Level 0 is 100 times (1 minus 0), which is 100. Level 1 is 100 times (1 minus 0.05), which is 95.00. Level 2 is 100 times (1 minus 0.10), which is 90.00. Level 3 is 85.00. The stored price rounds to the nearest cent. These four are already on a cent, so rounding changes nothing. A compound chain is where rounding shows. A compound step keeps the unrounded price for the next multiplication and stores the rounded cent as the buy. The glossary states that rule in one paragraph.
Percent below the entry uses the rounded buy. Level 1 is (100 minus 95.00) divided by 100, which is 5%. Level 2 is 10%. The column is a description of the rung you already computed. It is not a second input.
Dollars at a rung are the rounded price times the shares, then rounded to the cent. Level 0 is 100.00 times 10, which is 1,000.00. Level 1 is 95.00 times 10, which is 950.00. Level 2 is 90.00 times 10, which is 900.00. Cumulative cost adds those figures and rounds to the cent again: 1,000, then 1,950, then 2,850. Cumulative shares are 10, then 20, then 30.
Average cost, sell price, and profit
Average cost is cumulative cost divided by cumulative shares. After level 0 it is 1,000 / 10, which is 100. After level 1 it is 1,950 / 20, which is 97.50. After level 2 it is 2,850 / 30, which is 95. The average falls because the new shares were bought below the old average. A linear schedule falls faster, because it adds more shares at the lower prices. You can put linear lots beside this plan with the compare control and read the delta. The math is the same. The share counts are not.
The sell price is the average times (1 plus the target). After level 0, 100 times 1.08 is 108. After level 1, 97.50 times 1.08 is 105.30. After level 2, 95 times 1.08 is 102.60. After level 3, the average is 92.50 and the sell price is 99.90. Notice that 99.90 is below the entry of 100. The target has been reached, in the worksheet's sense, without getting back to the first buy. That is ordinary arithmetic. It is also the fact that makes 'I will get out a little above my start' a different plan from the one this worksheet computes.
Profit if you sell the whole position at that price is cumulative cost times the target. After level 0, 1,000 times 0.08 is 80. After level 1, 1,950 times 0.08 is 156. After level 2, 2,850 times 0.08 is 228. You can see the same identity from the other side. Selling 30 shares at 102.60 brings in 3,078. The shares cost 2,850. The difference is 228. The identity holds because the sell price was defined as average cost times (1 plus the target), and average cost was cost divided by shares. Costs, taxes, and slippage would subtract from the 228. The worksheet does not estimate them. It leaves them at zero and labels the profit as before those items.
The loss if price stops
Drawdown exposure at the deepest rung is the cost of the shares minus their value at that rung's price. After three rungs the cost is 2,850 and the price is 90. Thirty shares at 90 are worth 2,700. The unrealized loss is 150, which is about 5.26% of the 2,850. The full 6-rung plan is larger: $5,250 of cost, and $750 of unrealized loss if price stops at 75.00, about 14.29% of the cash in the ladder. The percent is not the distance from 100 to 75.00. The loss percent is smaller than the price decline, because many of the shares were bought on the way down, closer to the stop. The dollars are still large, because the share count is large. Both numbers belong on the page. Either one alone is a sales trick.
The slider generalizes that last step. If price stops at a number that is not a rung, only the rungs at or above that number are filled. A stop at 96, between 100 and 95, fills only level 0. Ten shares at 96 are worth 960 against a cost of 1,000, an unrealized loss of 40. A stop at 95 fills level 0 and level 1: 20 shares, cost 1,950, market value 1,900, unrealized loss 50. A stop at 87, below the third rung, fills all three and marks the shares at 87, not at 90. Market value is 2,610. The loss is 240. The slider is that arithmetic at whatever price you point at. It is still not a forecast, and it still ignores a gap that jumps over a rung without filling it.
A cap changes which rungs exist. If the cap is 1,950, level 0 and level 1 fit exactly, and level 2's 900 would push the total to 2,850, so the worksheet stops. Built 2 of however many you asked for. The next rung did not fit. If the cap is one dollar less, 1,949, level 1 no longer fits and only level 0 remains. The rule is strict on purpose. 'Close enough' would be a second, hidden plan.
What the formulas refuse to do
They refuse a non-positive entry, a step that is not between 0 and 100 percent, a level count outside 1 to 40, a non-positive base, an unknown lot scheme, an unknown spacing, a target that is not above zero and below 1,000 percent, and a cap that is not above zero. They refuse a plan whose prices hit zero. They refuse a cap below the first rung. The messages name the field. They do not suggest a ticker, a direction, or a size you 'should' use.
They also refuse, by omission, to be a tax lot ledger. Average cost here is not your tax basis. A wash sale adjustment is not applied. A commission is not applied. A partial fill is not applied. If you need those, this worksheet is the wrong instrument, and it says so in the margin of the page.
The hypothetical backtest is a different instrument again. Its figures are not the output of this worksheet, and they are under review. The worksheet's 14.29% on the 6-rung example is one name, stopped at the last rung, with no other positions and no T-bills. The backtest is a portfolio figure over about 10 years, with idle cash described as sitting in T-bills, and it did not beat SPY on raw return. Mixing the two numbers is how a precise worksheet gets laundered into a track record. The results page describes that test, labeled hypothetical, with the forward test still empty. The forward paper test start date is to be announced. No results yet.
If you want to check a different plan, change one input and recompute. Compound spacing, flat lots, and a cap are all in the same function. The presets exist so a shared link can start from a named shape: the example worksheet, a shallow flat ladder, a wide 7% step, or a capped flat plan. The link is the inputs. There is no account behind it.
Questions on this note
Why is level 1 at 95.00 when the entry is 100 and the step is 5%?
Arithmetic spacing prices rung k from the entry: 100 times (1 minus 1 times 0.05) is 95.00. The percent is taken from the entry, not from a shrinking base, on this spacing.
Why is profit equal to capital times the target?
The sell price is average cost times (1 plus the target), and average cost is capital divided by shares. Selling every share at that price returns capital times (1 plus the target). The profit is the extra piece, capital times the target, before costs.
Does the calculator include fees?
No. It assumes a fill at the rounded rung price and a later sale of the whole position at the target. Commissions, spreads, taxes, and slippage are left out and the page says so.