HomeTrading Widgets › Stop Loss Calculator Widget

Stop Loss Calculator Widget

Works out the exact stop price from an account size, a risk percentage and an entry, in one step.

One lineNothing to install
🛑
Exact priceNot a pip guess
🆓
FreeCommercial use allowed

i In short

Most traders place stops by eye, which is another way of saying they place them where the chart looks tidy rather than where their risk rule allows. A stop-loss calculator inverts that: it starts from how much the trader is prepared to lose and works backwards to the price. Both approaches have a place, and the useful habit is checking one against the other, which is exactly what a calculator on your page makes easy.

Your reader enters an account balance, a risk percentage, an entry price and a position size, and the widget returns the stop price that caps the loss at that amount, for a long or a short. If that price sits somewhere structurally absurd, the reader has learned something important about their position size rather than about their stop.

It complements rather than duplicates a position size calculator. Position size holds the stop fixed and solves for size; this one holds the size fixed and solves for the stop. Readers who work with a fixed lot size, which includes most people trading a prop firm challenge or a small account, need the second version.

The widget is a static file with no tracking, no sign-up and no external dependency, and its appearance is set from the iframe URL.

Try the Stop Loss Calculator Widget

Live previewThis is exactly what your readers will see

Embed code

Copy this into your page

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.

How to add it to your site

  1. Copy the code above Use the copy button so nothing is lost to line wrapping. It is a single iframe tag and it does not need anything else.
  2. Open the page you want it on In WordPress add a Custom HTML block, in Wix use the Embed HTML element, in Squarespace use a Code block, and on a hand-built site paste it straight into your HTML.
  3. Paste and publish The widget appears immediately. If you see an empty space instead, your editor has stripped the iframe tag, which the HTML embed guide explains how to work around.
  4. Adjust the look if you want to Add the parameters in the table below to the iframe URL to change the theme, the accent colour or the height. Nothing needs to be configured on our side.

Customisation options

ParameterValuesWhat it does
themeauto, light, darkDefault follows the reader's own system setting, so the widget looks right on a dark site and a light one without you choosing.
accentSix hex digits, e.g. accent=1A56DBRecolours the header bar and the primary button to match your brand.
header1 or 0Set to 0 to hide the title bar when your page already has a heading above the widget.
breakdown1 or 0Set to 0 to hide the calculation breakdown for a more compact block.
corners1 or 0Set to 0 for square corners if your design has no rounding anywhere else.
widthfullRemoves 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.

What the widget calculates

The widget computes the cash amount at risk, divides it by the position size to get the permissible price movement, and applies that distance above or below the entry depending on direction. It shows the stop price, the distance in price terms and in pips, and the resulting cash loss.

Because it also reports the stop distance as a percentage of the entry, readers can immediately compare it against the instrument's typical daily range, which is the check that stops a technically correct stop from being placed inside the noise.

Who this widget suits

Risk management articles

Turns a rule of thumb into a number a reader can act on.

Platform and order-entry guides

The output is a price, which is exactly what the order ticket asks for.

Prop firm challenge pages

Traders working to a fixed size and a hard daily loss limit need the stop solved for, not the size.

Related widgets

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.

Frequently asked questions

How is this different from the position size widget?

They solve the same equation for different unknowns. The position size widget takes your stop and tells you how large to trade. This one takes your size and tells you where the stop must sit. Which you need depends on which of the two is fixed for your reader.

Does it suggest where to place a stop technically?

No, and it deliberately does not try. It calculates the stop implied by a risk budget. Whether that price sits above a swing low, inside the average true range or in the middle of a consolidation is a chart judgement, and the ATR stop-loss calculator is the tool for the volatility side of that question.

Does it handle short trades?

Yes. The reader selects the direction and the stop is placed above the entry for a short rather than below it. Getting that the wrong way round is a common and expensive beginner error, so it is worth demonstrating.

Can it work in pips rather than price?

It reports the distance in both, so a reader working in pips gets the figure they need without converting anything by hand.

Is a stop-loss guaranteed to execute at that price?

No, and this is worth saying on any page where you embed it. A standard stop becomes a market order when triggered, so gaps and fast markets can fill it worse than the level set. Slippage is the mechanism, and guaranteed stops, where a broker offers them, usually carry a premium.

🛡️
Test the numbers on real prices

Try a Free Demo Account

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 account
  • FSCA RegulatedTrade with confidence
  • Practice Risk FreeReal market conditions
  • Beginner FriendlyPerfect for learning

79% of retail CFD accounts lose money. Demo accounts do not guarantee future profits.