Home / Blog / Polymarket odds calculator
Prediction markets · Concept & demoPolymarket Odds Calculator: Turn Order-Book Depth Into Real Bookmaker Odds
A bookmaker shows you one clean number: 1.85. Polymarket shows you a share price like $0.54 and an order book. This article closes that gap: how to turn a prediction-market outcome into a real, execution-accurate decimal odd for the exact amount you want to stake — with a working calculator you can play with below.
An honest, technical walkthrough of a pricing calculation, plus a live demo running on sample data. It is not betting advice and not a trading signal. Prediction markets carry real risk of loss and are restricted in some regions.
Shares, probability, and the naive odd
On Polymarket you don't buy "odds" — you buy shares of an outcome. A winning share settles at $1. A losing share settles at $0. So the price of a share is, quite literally, the market's implied probability of that outcome.
If a share costs $0.20, the market thinks the event is ~20% likely, and the naive decimal odd is simply the inverse:
odd = 1 / price = 1 / 0.20 = 5.00
Buy one $0.20 share, and if you win you receive $1 — a 5.00 payout multiple. That is the classic bookmaker decimal odd. Easy. The problem is that this only holds for one share at the very best price.
Why the headline price lies
The last-traded price and the best ask can each sit on a tiny amount of size — sometimes a few dollars. The moment you try to stake a real amount, you don't get filled entirely at that number. You "eat" into the book: the cheapest shares first, then the next level up, then the next, each one a little more expensive.
So your average execution price ends up higher than the headline, and your real odd is lower than 1 / best_price. A market that looks like 5.00 on the sticker might really be 4.2 once you buy $100 of it. If you quote the sticker, you're lying to yourself about the payout.
The fix is not to trust any single number. It's to simulate the actual purchase through the order book, for the specific amount you want to stake.
Walking the order book
Because we're buying, we look at the ask side (the shares people are willing to sell). Then, for a chosen stake, we fill from the cheapest ask upward:
- Sort the asks from the lowest price to the highest.
- At each level, the money it would take to buy the whole level is
price × available_shares. - If your remaining budget covers the whole level, buy all of it and move on.
- If it doesn't, buy
remaining / priceshares at that level and stop — the budget is spent. - Keep a running total of shares bought and money spent.
That running total is everything you need. It represents an order that would actually get filled — not a fantasy at the best price.
The formulas
Once you've walked the book for a stake, four numbers fall out:
| Metric | Formula |
|---|---|
| Average price | spent / shares |
| Effective odds | shares / spent |
| Payout if win | shares (each pays $1) |
| Profit if win | shares − spent |
Worked example. You stake $100 and the simulation buys 185 shares:
- spent = $100, shares = 185
- average price = 100 / 185 =
$0.5405 - effective odds = 185 / 100 = 1.85
- payout if win = $185 · profit if win = $85
So the bookmaker card reads: Odds 1.85 · Payout $185 · Profit $85 — and crucially, that 1.85 is the average execution odd for $100, not the last trade and not just the best ask.
⚽ PSG vs Real Madrid — match winner
Pick a stake. Each odd is simulated by walking the ask book for that exact amount — watch the odds and the liquidity status change.
Illustrative sample data, not live Polymarket prices. Not betting advice.
Handling thin liquidity honestly
Real books run dry. A good calculator has to say so instead of inventing shares that aren't there:
- Insufficient liquidity — if the whole book can't absorb your stake, only report what actually fills: "Only $X of $Y filled." Never pretend the rest executed.
- Low liquidity — if the effective odd moves a lot between a small $10 test and your real stake, the book is thin; flag it so nobody trusts a fragile number.
- No liquidity — if there are no asks at all, show no odd. A blank is more honest than a made-up one.
In the demo above, try $300 on the thin outcome to watch it flip to a fill warning, and compare $10 vs $300 to see the "low liquidity" flag appear when the average odd drifts.
The reference code
Here's the core simulation. Feed it a stake and the ask levels for one outcome; it returns the fill, the effective odds, and the liquidity flags.
function simulatePolymarketOdds(stake, asks) {
let remaining = stake, shares = 0, spent = 0;
const sortedAsks = asks.slice().sort((a, b) => a.price - b.price);
for (const level of sortedAsks) {
const price = Number(level.price);
const availableShares = Number(level.size);
const costAtLevel = price * availableShares;
if (remaining >= costAtLevel) {
shares += availableShares;
spent += costAtLevel;
remaining -= costAtLevel;
} else {
shares += remaining / price; // partial fill of this level
spent += remaining;
remaining = 0;
break;
}
}
if (shares === 0 || spent === 0) return { available: false, reason: "No liquidity" };
return {
available: true,
spent,
shares,
averagePrice: spent / shares,
effectiveOdds: shares / spent,
payoutIfWin: shares,
profitIfWin: shares - spent,
unfilledAmount: stake - spent,
insufficientLiquidity: spent < stake
};
}
To make it live, replace the sample data with the real book. Polymarket exposes its order books through the CLOB API (each market's outcome has a token id; you request its book and read the asks array of {price, size} levels). Cache it, refresh on a short interval, and recompute the moment the user changes the stake — exactly like the demo does client-side.
From prediction markets to trade execution
Notice what this really is: an order-book-aware price. It refuses to quote a number that a real order wouldn't actually get. That principle isn't specific to prediction markets — it's the difference between amateur and serious execution anywhere, including crypto.
It's the same reason a good crypto trading bot should size and price from real book depth and real fills rather than a last-printed tick. It's the thinking behind how OX-ENGINE executes on Aster DEX and reconciles performance to actual filled prices, to the cent. Different market, same discipline: quote what would truly fill, not the sticker.
FAQ
How do you convert a Polymarket price to decimal odds?
A winning share pays $1, so the price is an implied probability and the naive odd is 1 / price. For a real stake, divide the total shares you'd actually receive by the dollars spent walking the book — that's the true execution odd.
Why not just use the last price or the best ask?
Both can sit on tiny size. Buy a real amount and you eat deeper, worse levels, so your average price rises and your real odd falls below 1 / best_price.
What does "effective odds" mean?
The average execution odds for your chosen stake: shares / spent. Not the last trade, not only the best ask.
Is this betting or financial advice?
No. It's an educational explanation of a calculation. Prediction markets carry real risk and are restricted in some places. Nothing here is financial or betting advice.