Try the Leverage Calculator Widget
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
- 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.
- 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.
- 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.
- 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
| 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.
What the widget calculates
The widget divides total position value by account equity to give the effective leverage ratio, then models the account impact of price moves at several sizes so the reader can see the relationship rather than infer it.
It also works in reverse: a reader who knows the maximum drawdown they will accept from a given move can see what exposure that permits, which is a more disciplined way to arrive at a position than starting from the broker's maximum.
Who this widget suits
CFD and forex education
Effective leverage is the single most misunderstood number in retail trading.
Broker comparison pages
Useful context next to a table of headline leverage ratios, which on their own tell a reader very little.
Risk disclosure pages
A working demonstration carries more weight than a warning in bold type.
Related widgets
- Margin Calculator WidgetMargin Calculator
- Position Size Calculator WidgetPosition Size Calculator
- Lot Size Calculator WidgetLot Size Calculator
- Forex Calculator WidgetForex Calculator Set
The full library of free trading widgets has more than eighty tools, and the widget builder lets you preview and configure any of them before you copy the code.
Frequently asked questions
What is effective leverage?
It is total position value divided by account equity, which is the leverage actually in use rather than the maximum the broker permits. A trader on a 1:500 account who opens one micro lot is using a fraction of one to one. The account ratio is a ceiling, not a setting.
The distinction is explained in more depth in leverage versus margin in practice.
Does the FSCA cap leverage for South African traders?
South Africa does not impose a single blanket retail leverage cap in the way that some jurisdictions do, so FSCA-regulated brokers set their own limits and these vary widely. That makes the effective leverage figure more important for a South African audience, not less, since the ceiling is not doing the work for them.
How is this different from the margin calculator?
The margin widget answers how much deposit a position requires. This one answers how exposed the account is once the position is open. Margin is about whether you can place the trade; effective leverage is about what happens to you afterwards.
Can readers use it across several open positions?
Yes, by entering the combined notional value of everything open. That total is the figure that matters, and it is usually considerably higher than traders assume, which is the point of the exercise. Portfolio heat approaches the same problem from the risk side.
Does higher leverage mean higher risk?
Higher effective leverage means a given price move has a larger effect on the account, which is a mechanical fact rather than a judgement. Whether that constitutes higher risk depends on position size and stop placement, which is why this widget is most useful next to a position size or stop-loss calculator rather than on its own.