Try the Position Size 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 asks for an account balance, a risk percentage, an entry price and a stop-loss price, then works through the standard risk-based sizing formula: risk amount equals balance multiplied by risk percentage, and position size equals risk amount divided by the per-unit distance between entry and stop. It shows the resulting position size, the cash at risk, and the stop distance in both price terms and as a percentage of the entry.
Below the result it prints a step-by-step breakdown of how the number was reached, which is the part that makes it useful as a teaching tool rather than a black box. Readers who have never sized a trade deliberately can follow each line and see why a wider stop forces a smaller position, and why increasing risk percentage is a far blunter instrument than most beginners expect.
Who this widget suits
Trading education sites
Drop it into a lesson on risk management so readers can test the concept immediately instead of reading the formula and moving on.
Finance blogs and newsletters
A working tool in a post gives readers a reason to return to that page, which tends to help both time on page and repeat visits.
Course and membership pages
Embed it in a module on money management. It works inside most course platforms that allow a raw HTML block.
Related widgets
- Lot Size Calculator WidgetLot Size Calculator
- Pip Calculator WidgetPip Value Calculator
- Stop Loss Calculator WidgetStop-Loss Calculator
- Risk Reward Ratio Calculator WidgetRisk-Reward Ratio Calculator
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
Is the position size calculator widget really free?
Yes, for any site including commercial ones. There is no licence fee, no usage cap and no sign-up. The only thing asked in return is that you leave the small credit line at the bottom of the widget in place, since that is how readers find the full version and how the tool continues to pay for itself.
If the credit line does not suit your layout, get in touch through the contact page rather than stripping it out, and we will usually find an arrangement that works.
Does the widget work on WordPress?
Yes. Paste the iframe into a Custom HTML block in the block editor, or into the Text tab of the classic editor. Elementor users should use the HTML widget rather than the Text Editor widget. The WordPress instructions page covers each of those routes step by step, including the common problem of the visual editor stripping iframe tags on some managed hosts.
Will it slow my page down?
The iframe is loaded lazily, so the browser only fetches it when the reader scrolls near it. The widget carries no external fonts, no framework and no tracking scripts, and the whole document is under 50KB. In practical terms it costs less than a single stock photograph.
Can I change the colours to match my site?
Yes. Add accent=RRGGBB to the iframe URL with your hex colour and the header bar and primary button pick it up. You can also force theme=light or theme=dark, or leave the default and the widget follows your reader's system setting. The widget builder lets you set all of this visually and gives you the finished code.
Does the widget collect anything about my visitors?
No. There are no cookies, no local storage, no analytics and no network calls once the page has loaded. Everything a reader types stays in their browser and disappears when they close the tab. That is deliberate, because a calculator that quietly reports what your readers are risking would be a liability for you as the publisher.
How is this different from just linking to your calculator?
A link sends your reader away. The widget keeps them on your page, which is usually the point of adding a tool in the first place. If you would rather link, the full calculator page adds worked examples and a long FAQ that the embedded version deliberately leaves out to stay compact.