Works out the risk-to-reward ratio from an entry, a stop and a target, and the win rate it would need to break even.
Risk-to-reward is the ratio everyone quotes and few people calculate. A trader says they only take trades at 1:2, then places one with a stop thirty pips away and a target forty pips away and does not notice. A calculator on the page makes that check automatic, and because it is instant it is the kind of check a reader will actually perform.
The widget takes an entry, a stop-loss and a take-profit, and returns the ratio in both directions along with the minimum win rate that ratio would need to break even. That second number is the one that changes behaviour. A 1:1 setup needs to win more than half the time before costs; a 1:3 setup needs to win only just over a quarter. Seeing that relationship written down reframes how a reader thinks about their own strategy.
It works for long and short trades and in any instrument, since the calculation is simply the distance from entry to stop against the distance from entry to target.
As with the whole set, there is no sign-up, no tracking and no external dependency. Appearance is controlled by parameters on the iframe URL so it can match your design without touching your stylesheet.
Free for any site, including commercial ones. Keep the small credit line at the bottom of the widget so readers can find the full version. Nothing is stored about the people who use it. See the disclaimer.
| Parameter | Values | What it does |
|---|---|---|
theme | auto, light, dark | Default follows the reader's own system setting, so the widget looks right on a dark site and a light one without you choosing. |
accent | Six hex digits, e.g. accent=1A56DB | Recolours the header bar and the primary button to match your brand. |
header | 1 or 0 | Set to 0 to hide the title bar when your page already has a heading above the widget. |
breakdown | 1 or 0 | Set to 0 to hide the calculation breakdown for a more compact block. |
corners | 1 or 0 | Set to 0 for square corners if your design has no rounding anywhere else. |
width | full | Removes the 520px maximum so the widget stretches to its container. |
Parameters are added to the iframe URL as a normal query string, for example
/embed/position-size-calculator.html?theme=dark&accent=1A56DB&header=0. The
widget builder lets you set all of them visually and hands you the finished code.
The widget computes the risk leg and the reward leg from the three price inputs, expresses the ratio in the conventional 1:X form, and derives the break-even win rate as one divided by one plus the ratio. It flags ratios below 1:1 rather than presenting them neutrally, since those require a win rate most strategies do not sustain.
Pairing it with the break-even win rate calculator and the expectancy calculator gives a reader the full picture of whether a strategy can work over a sample rather than on a single trade.
Readers can test your published setup against their own entry and exit levels.
The break-even win rate output makes the abstract argument concrete in one line.
A quick way to score a planned trade before it is taken.
The full library of free trading widgets has more than seventy tools, and the widget builder lets you preview and configure any of them before you copy the code.
There is no universally correct figure, because a ratio only means something alongside a win rate. A 1:1 strategy with a 60% win rate is profitable before costs; a 1:3 strategy with a 20% win rate is not. The widget shows the break-even win rate for whatever ratio is entered, which is the honest way to answer the question.
The wider discussion is in this article on risk-reward ratios.
No, the ratio is calculated from the price levels entered. Costs push the real break-even win rate slightly higher than the theoretical one, which matters most on short-term strategies with tight stops. The trading cost calculator quantifies that separately.
This widget handles a single target. For scaling out across several targets, the scaling in and out calculator computes the weighted average exit and the blended outcome.
Before costs. It is the theoretical figure implied by the ratio alone. Treat it as a floor rather than a target, since spread and commission always raise the real requirement.
Yes. The calculation only uses the distance between price levels, so it is instrument agnostic. Only the units change.
Widgets show the maths. A demo account shows how the same maths behaves against live spreads and real market movement, without risking funds.
Open a free demo account79% of retail CFD accounts lose money. Demo accounts do not guarantee future profits.