What does 'scale in' mean in trading?+
Scaling in means building a position incrementally across multiple buy orders at different prices instead of buying all shares at once. By spreading purchases, a trader blends their average entry price — buying more at lower prices lowers the blended average, and the position only needs the market to recover to that average (not to the first purchase price) to break even. This calculator computes the quantity-weighted average entry across all buy lots.
What does 'scale out' mean in trading?+
Scaling out means selling a portion of your position to lock in realized profit (or cap a loss) while leaving remaining shares open to capture further price movement. For example, if you hold 200 shares at an average entry of $11 and the price rises to $15, selling 100 shares locks in $400 of realized P&L while the remaining 100 shares stay in the trade.
Does selling some shares change my average entry price?+
No. A partial sale (scale out) does not change your average entry (cost basis per share) for the remaining position. The average entry per share remains exactly what it was before the sale. Only the total remaining cost basis shrinks, because you now hold fewer shares. This is a key concept: avgEntry is a buy-side calculation and is unaffected by sell events.
How is realized P&L calculated when scaling out?+
Realized P&L = sellQty × (sellPrice − avgEntry). Each share sold is assumed to have cost you avgEntry (your blended average), and the profit or loss per share is the difference between the sell price and that average. The result can be positive (you sold above your average — a profit) or negative (you sold below your average — a realized loss). The sign is always preserved.
What is remaining cost basis and why does it matter?+
Remaining cost basis = remainingShares × avgEntry. It is the total capital still at risk in your open position after the scale-out. It matters for tax purposes (capital gains will be computed against this cost basis when you eventually close the full position) and for position-risk sizing (it tells you how much money is committed to the remaining trade).
Why would a trader scale out at a loss?+
Sometimes a position moves against the trader before they can exit fully. Scaling out at a loss reduces position size and total exposure, limiting further downside if the stock continues to fall. The realized P&L will be negative in this case, but it frees capital and lowers the risk of a larger loss if the trade does not recover. This calculator correctly preserves the negative sign on realizedPnL.
What is the difference between this calculator and the average price calculator?+
The average price calculator computes the blended cost basis across buy lots and marks unrealized P&L against a current price — it models a fully open position with no sales. The scale-in/out calculator adds a partial exit (scale-out) leg: it computes realized P&L on the sold shares, tracks the remaining open position, and optionally marks unrealized P&L on what remains. Use the average-price calculator for pure cost-basis questions; use this one when you also need to model a partial exit.
What is the difference between scale-in/out and pyramiding?+
Pyramiding adds to a winning position in progressively smaller tranches as the price moves in your favor — it focuses on building into a trend and managing the total risk of adding to a winner. Scale-in/out is a more general concept: scaling in may happen at lower prices (averaging down) or at higher prices (building a position), and scaling out is the partial exit that this calculator specifically models. Pyramiding focuses on tranche sizing and a total-risk stop; this calculator focuses on realized P&L, remaining shares, and remaining cost basis.
How many buy lots can I enter?+
Up to 30 buy lots. You can represent any number of historical purchases by combining older lots manually: compute their weighted average price and enter it as a single lot with the combined quantity.
Does this calculator work for ETFs, mutual funds, or crypto?+
Yes. The scale-in/out math is identical for any asset where you make multiple purchases at different prices and later sell a portion. For mutual funds, use the NAV as the price and units as the quantity. For crypto, use the coin price and coin quantity. The calculator is currency-agnostic and works for USD, INR, EUR, GBP, and JPY denominated positions.
Is realized P&L the same as taxable capital gain?+
Not exactly. Realized P&L here is the fee-free, pre-tax gain or loss computed against your average entry. Taxable capital gain depends on the actual proceeds net of transaction costs, the specific lot method your tax authority requires (FIFO, average cost, or specific identification), and applicable rates (short-term vs long-term holding period). Consult a tax adviser or your broker's tax statement for the correct taxable amount.
What happens if I sell more shares than I bought?+
The calculator clamps sellQty to totalBought. It does not model short-selling. If you enter a sellQty larger than totalBought, the remaining shares are set to zero and realizedPnL is computed on the full totalBought position. A warning appears in the UI so you can correct the input.