Home › Free tools › Position Size Calculator

FREE TOOLFREENO ACCOUNTAUTOMATED TRADE BOTSPosition SizeCalculatorFree calculator, runs in your browserEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on position size calculator. Education only, with example numbers labelled.
FREE TOOL

Position Size Calculator

Short answer

Units = (balance x risk percent) / |entry price - stop price|. The stop distance decides the size, not the other way round.

Pick how much of the account one trade may lose, then let the stop distance decide the size. Enter four numbers and see units, value and dollars at risk.

Type your own numbers and the answer updates as you go. The formula is written out below so you can check it by hand, and every example on the page is made up and labelled.

  • Free, no account, runs in your browser
  • A worked example with exact numbers
  • Shows where grid, martingale and DCA bots break the maths
  • Example numbers are made up and labelled

Last reviewed 28 October 2026. Education only, not advice.

Go to the calculator
Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Your numbers

What it says

Ready to go further

Next: turn the units into lots and pips

If you trade forex, the answer is usually in lots and the stop in pips. The lot size calculator does the same job in those units.

Inputs4 numbers
ResultInstant, in your browser
CostFree, no account
Reviewed28 Oct 2026

What is included

  • The calculator, with your own numbers
  • The formula written out
  • A worked example you can reproduce
  • Where grid, martingale and DCA bots break the maths

Who it is for

  • People running or testing a trading bot
  • Anyone sizing a position or checking costs
  • Readers learning how the numbers work
  • Not advice, and not for placing trades

Key facts

  • Units = (balance x risk percent) / |entry price - stop price|. The stop distance decides the size, not the other way round.
  • Doubling the stop distance halves the position. A wide stop means a small position if the dollar risk is held fixed.
  • This is fixed fractional sizing: risk the same percent of the account on each trade, so the dollar risk shrinks after losses and grows after wins.
  • The result assumes the stop fills at its price. A gap or slippage can lose more than the amount shown.
  • A bot with no stop, such as a grid or martingale bot, has no stop distance, so this formula cannot size it. Every example number here is made up.
Same $100 risk, different stop distance (made-up example)100 units$1 stopunits50 units$2 stopunits25 units$4 stopunits$10,000 balance, 1% risk = $100, entry $50. Units = 100 / stop distance. A made-up example.
The picture for this page. Example numbers are made up unless the page says they were calculated.

How the calculator works

Most people start with a size and then wonder what a bad trade costs. This tool starts at the other end. You choose the most one trade may lose, as a percent of the account, and the stop price. The size is whatever makes that stop cost exactly that amount.

Risk in dollars = balance x risk percent / 100
Units = risk in dollars / |entry price - stop price|
Position value = units x entry price

This is often called fixed fractional sizing, because each trade risks the same fraction of the account. Because the account changes, the dollar risk changes too: it gets smaller after a loss and bigger after a win. That is the point of it. A run of losses cuts the size of the next trade automatically.

A worked example

Take a made-up $10,000 account, a risk of 1 percent, an entry at $50 and a stop at $48. The dollar risk is 10,000 x 1 / 100 = $100. The stop is $2 away, so units = 100 / 2 = 50 units. The position is worth 50 x $50 = $2,500, which is 25 percent of the balance, and the stop sits 4 percent below the entry. If the stop fills at $48 the loss is 50 x $2 = $100. If the stop were at $49 instead, the same $100 risk would allow 100 units, and at $46 it would allow only 25. Calculated by us on 27 Oct 2026, exact arithmetic on made-up inputs.

Why the stop distance decides the size

The stop is the one number that turns a loss into a known amount. If you move a stop wider to avoid being stopped out and keep the same size, you have quietly raised your risk. If you keep the risk fixed, a wider stop forces a smaller position, which is the honest trade-off. The chart below shows how the units grow with the risk percent when the stop stays $2 away.

Units allowed by a fixed risk, for different risk percents (example)040801201600.5%1%1.5%2%2.5%3%2550 units100150Risk per trade, percent of a $10,000 account, stop $2 from entry
Units are in direct proportion to the risk percent: 2 percent risk means twice the units of 1 percent. Made-up example, calculated as balance x risk / 100 / 2.

Where bots break the formula

Position sizing assumes every trade has an exit that caps the loss. Many popular bots do not. A grid bot has no stop on its levels, and a martingale bot adds to a loser and keeps no stop at all until the account does it for them. With no stop price, the distance in the formula is not defined, so the units cannot be worked out. The risk is not capped, and no percent you enter makes it so.

You can still size such a bot, but you have to do it by choosing a worst case yourself: the price at which you would be out, and the total position at that price. Then the question becomes the one in the margin calculator: does the account survive a move that far? Fixed fractional sizing is for one trade with one exit. A ladder is many trades with one shared outcome.

What this formula does not cover

  • Gaps and slippage. A stop is a request to sell at a price or worse, so the real loss can be bigger. See the stop loss calculator for the size of that gap.
  • Costs. Spread and commission add to the loss on a stopped trade. Add them to the stop distance if you want them counted.
  • Several trades at once. Five positions each risking 1 percent can all lose together if they are correlated.
  • Lot steps. Real platforms round to a minimum size. Round down, not up, or the risk goes over.
A risk percent is a choice, not a recommendation. This page does not say what percent to use, and a small percent does not make a bad strategy good.

FAQ

Frequently Asked Questions

What risk percent should I use?

This page cannot say, and it is not a recommendation either way. A smaller percent shrinks each loss and slows any gain. What matters is that you pick one on purpose and keep to it, because the size follows from it.

Why is my position bigger than my account?

When the stop is close to the entry, the formula allows a large number of units for the same dollar risk. That position needs leverage, and then the margin level matters as well as the stop.

Does this work for shorts?

Yes. The formula uses the distance between entry and stop, so it does not matter which side is higher. For a short, the stop is above the entry.

Can I use it for crypto and stocks?

Yes, with units as coins or shares. Round down to the smallest size your exchange or broker accepts, and add fees to the stop distance if you want them in the risk.

Can I size a grid or martingale bot with it?

Not directly. Those bots have no stop on each level, so there is no distance to divide by. You need to choose a worst-case price and size the whole ladder against it.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is a calculator and general education. It does not know your account, your costs or your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss