How to use the trailing stop calculator
- Choose the trail type. A percentage trail keeps the stop a fixed share below the high, so it widens in dollars as the price rises. A dollar trail keeps the same distance in dollars all the way.
- Enter the entry price and the trail distance. The starting stop is the entry minus the trail.
- Paste the closing prices after the entry, oldest first. They can be daily, weekly or any other interval. The example holds 20 closes that rise to a high and then fall back.
- Add the number of shares if you want the total profit or loss.
The chart draws the price and the stop together, with the exit marked. Below it, the close-by-close table shows the highest close and the stop level after each period, and a second table runs several trail widths over the same prices.
How the trailing stop is calculated
Percentage trail: Stopt = Highest closet × (1 − Trail %)
Dollar trail: Stopt = Highest closet − Trail amountThe stop never moves down. The first close at or below the stop in force ends the trade, and the exit price is that close.
Give-back = Highest close − Exit price
Share of the best gain kept = (Exit − Entry) ÷ (Highest close − Entry)
A worked example
You buy at $50 with an 8% trailing stop, so the first stop is $46.00. Over the next weeks the stock climbs, and each new high pulls the stop up. At the highest close of $61.50, the stop reaches $56.58.
The stock then drifts lower. Close #19 comes in at $56.10, below the stop, and the trade ends there. The profit is $6.10 per share, or $610.00 on 100 shares, a return of +12.20%.
Selling at the top would have made more. The trade gave back $5.40 from the high, 8.78%, and kept 53% of the best gain. The close also landed $0.48 below the stop level, the cost of checking the stop only at the close.
Choosing the trail distance
The trail distance is a trade-off between staying in a trend and keeping the gains it produces. The same 20 closes with different trails:
| Trail | Exit | Exit price | Profit per share |
|---|---|---|---|
| 3% | Close #6 | $52.40 | $2.40 |
| 5% | Close #18 | $57.20 | $7.20 |
| 8% | Close #19 | $56.10 | $6.10 |
| 10% | Close #20 | $54.30 | $4.30 |
| 12% | Not hit | stop at $54.12 | $4.12 locked in |
The 3% trail is shaken out by a small dip early in the advance and misses most of the move. The wider trails ride the trend, but the widest ones give back more on the way down, and the 12% trail has still not been hit when the series ends. The best width here is a product of this particular price path; on another stock, or another month, the ranking can change. A trail that sits just beyond the stock’s typical pullback is the usual aim, which is why many traders size it from the ATR with the stop-loss calculator.
Percentage or dollar trail
A percentage trail grows in dollar terms as the price rises: 8% of $50 is $4.00, 8% of $61.50 is $4.92. A dollar trail stays fixed, so it tightens relative to the price as the stock climbs. With a $4 trail on the example prices, the trade exits at $57.20 on close #18 for a profit of $7.20 per share. Percentage trails suit longer trends and higher-priced stocks; dollar trails are common for short-term trades sized from a fixed risk.
Trailing stops and risk-reward
A trailing stop has no fixed target, so the reward is open-ended while the risk at entry is known: the distance from the entry to the first stop. Once the stop rises above the entry, the planned exit is at a profit, although a sharp drop or a gap can still fill below the entry. Measuring the result in multiples of that first risk makes trailing-stop trades comparable with fixed-target trades; the risk-reward calculator shows the break-even win rate for any multiple.
What this calculator does not include
- Intraday prices. The calculator checks the stop at each close. A broker’s trailing stop order reacts during the session, so it can exit earlier, at a price nearer the stop.
- Gaps. A stock that opens far below the stop fills far below it, with either method.
- Short positions. The calculation is for longs; a short trailing stop mirrors it above the lowest price.
- Commissions, dividends and taxes, which change the net result. The stock profit calculator adds commissions to a trade.
- Hindsight. A trail width that looks best on past prices is not a forecast; test it on many trades before relying on it.