All free tools

Trading metric

Payoff Ratio Calculator

Divide the average amount won on winning trades by the average amount lost on losing trades to get the payoff ratio, and see the win rate it takes to break even at that ratio.

From averages

Payoff ratio
2.000
Breakeven win rate
33.33%
The win rate at which this payoff ratio gives zero expectancy.

From totals and trade counts

Payoff ratio
2.500
Breakeven win rate
28.57%
The win rate at which this payoff ratio gives zero expectancy.

What the payoff ratio is

The payoff ratio is the average winning trade divided by the average losing trade, with the loss taken as a positive number. A payoff ratio of 2 means the typical winner was twice the size of the typical loser over the sample.

It is not the same as the profit factor. The profit factor compares total profit to total loss, so it depends on how many trades won. The payoff ratio compares the size of an average win to the size of an average loss and ignores how often each happens.

Payoff ratio and win rate

The two numbers are linked. A trade that pays b times what it risks breaks even when the win rate equals 1 / (1 + b). At a payoff ratio of 2 that is 33.33%, and at 0.5 it is 66.67%. The calculator shows this breakeven win rate next to the ratio so you can compare it with your own.

Both figures describe past results over a specific sample. They are not a forecast, and how much weight to give them is your own judgment.

What are TradingView and Pine Script?

TradingView is one of the most widely used charting and market-analysis platforms, where traders and analysts study price movement across stocks, crypto, forex, and futures on interactive charts. Pine Script is TradingView's own lightweight programming language, created so anyone can build custom tools that run directly on those charts.

People use Pine Script to build four main kinds of tools. Indicators calculate and plot values on the chart, exactly like the calculation above, but recomputed automatically on every bar. Strategies add explicit entry and exit rules and can be backtested against historical data in TradingView's Strategy Tester to see how they would have behaved. Screeners scan many symbols at once for conditions you define. Alerts notify you the moment a condition you specified occurs, so you do not have to watch the screen.

The value is precision and automation. Instead of eyeballing a chart, you describe exactly what you want measured, visualized, or notified about, and TradingView runs it consistently across any market and timeframe. That is why traders, analysts, and developers write Pine Script: it turns a manual charting idea into a repeatable tool. These tools are for tracking, visualizing, and testing market ideas; they do not tell you what to trade, and that decision always remains yours.

Writing that code by hand means learning Pine Script's syntax, its type system, and the exact names of hundreds of built-in functions. It is a real programming language, and small mistakes stop a script from compiling in the Pine Editor.

Turn this into Pine Script

You typed the averages in by hand here. In a TradingView strategy you can compute them from strategy.grossprofit, strategy.grossloss, strategy.wintrades and strategy.losstrades. The work is turning your rules into a strategy that produces those totals.

Pine Script v6
//@version=6
strategy("Payoff Ratio Example", overlay=true)

// ... your entry and exit rules go here ...

// Average winner and average loser from closed trades
winCount  = strategy.wintrades
lossCount = strategy.losstrades
avgWin    = winCount  > 0 ? strategy.grossprofit / winCount  : na
avgLoss   = lossCount > 0 ? strategy.grossloss   / lossCount : na

payoff = avgLoss > 0 ? avgWin / avgLoss : na
breakevenWinPct = not na(payoff) ? 1 / (1 + payoff) * 100 : na

plot(payoff, "Payoff ratio")
plot(breakevenWinPct, "Breakeven win rate %", color=color.orange)

PineScripter is an AI built specifically for Pine Script. You describe what you want in plain English and it writes TradingView-ready v6 code. Because it is specialized on the Pine Script language and its exact function signatures, it tends to produce code that compiles far more reliably than general-purpose models like ChatGPT, which often invent functions that do not exist in Pine Script.

Related free calculators

From the blog

PineScripter is an AI developer tool that helps you write Pine Script code. It is not a financial advisor and will never offer financial, investment, or trading advice. Everything on this page, including the calculator and the explanations, is provided purely for educational and informational purposes. Any decision about how to interpret an indicator or trade a market is entirely your own. See our full disclaimer for more.