Skip to main content
AI Fin Hub

Formula, in Backtesting & Validation

Profit Factor Formula

Profit factor is gross profit divided by gross loss: the total of all winning trades over the absolute total of all losing trades. A profit factor above 1.0 means the system made money; 1.5 to 2.0 is solid; above 2.0 is strong but should be checked for overfitting on small samples. It folds win rate and payoff ratio into one figure.

4 variables. Published May 26, 2026. By AI Fin Hub Research.

Formula
ProfitFactor = GrossProfit / |GrossLoss| Equivalently: PF = (WinRate x AvgWin) / ((1 - WinRate) x AvgLoss)

Variables

GrossProfit

Gross profit

Sum of the profits from all winning trades, before costs are netted across the book. It is the total upside the strategy produced.

GrossLoss

Gross loss

Sum of the losses from all losing trades, as an absolute value. Dividing gross profit by this gives the ratio of money made to money lost.

WinRate

Win rate

Fraction of trades that won. The equivalent form shows profit factor as the product of win rate and average win over loss rate and average loss, exposing how both inputs drive it.

AvgWin, AvgLoss

Average win and loss

Mean profit of winners and mean loss of losers. A high average win relative to average loss can carry a profit factor above 1 even with a sub-50% win rate.

Step by step

  1. 1

    Sum the profit of all winning trades to get gross profit.

    30 winners averaging 400 each give gross profit 12,000.

  2. 2

    Sum the loss of all losing trades, as a positive number, to get gross loss.

    70 losers averaging 100 each give gross loss 7,000.

  3. 3

    Divide gross profit by gross loss.

    12,000 / 7,000 = 1.714.

  4. 4

    Interpret the result: above 1.0 is profitable, with 1.5 to 2.0 considered robust over a meaningful sample.

    1.71 indicates a healthy edge if the trade count is large enough to trust.

Worked example

Mean-reversion system, 100 trades, low win rate

Winners

30 trades, avg 400

Losers

70 trades, avg 100

Gross profit = 30 x 400 = 12,000. Gross loss = 70 x 100 = 7,000. Profit factor = 12,000 / 7,000 = 1.714. Cross-check via the win-rate form: (0.30 x 400) / (0.70 x 100) = 120 / 70 = 1.714.

Profit factor of about 1.71 despite a 30% win rate, because winners are four times the size of losers. This is the inverse of a typical trend system: here the edge comes from large, infrequent wins. A profit factor near 1.7 is solid, but on only 100 trades the standard error is wide, so confirm it holds out-of-sample before scaling size.

Common variations

Recovery factor: net profit divided by maximum drawdown, a profitability-per-risk variant.
Expectancy: average profit per trade, which (unlike profit factor) carries the scale of edge in currency, not just the ratio.
Adjusted profit factor: removes the single largest winning trade to test how dependent the result is on one outlier.

Run the numbers next

  • Calculators Kelly Criterion Calculator

    Size positions with full, half, quarter, or eighth Kelly and stress-test the choice with a drawdown Monte Carlo simulator. Client-side. Private by default.

  • Playgrounds Execution Simulator

    Estimate execution cost in closed form — square-root permanent impact, linear temporary impact, half-spread, and a latency-drift band. See the slippage a naive backtest hides.

Sources

  1. The Evaluation and Optimization of Trading Strategies , Robert Pardo, Wiley (2008)
  2. Trade Your Way to Financial Freedom , Van K. Tharp, McGraw-Hill (2006)

Keep the topic connected

  • Formula Win Rate Formula

    The win rate formula: winning trades divided by total trades. Why win rate alone is meaningless without the payoff ratio, with a breakeven example.

  • Formula Expectancy Formula

    The expectancy formula: win rate times average win minus loss rate times average loss. The expected profit per trade in R-multiples, with an example.

  • Formula Kelly Criterion Formula

    The Kelly criterion formula: the bet fraction maximizing long-run log growth from win probability and payoff odds. The optimal sizing rule.

  • Learn Overfitting

    Overfitting in trading-strategy backtests: how multiple-testing inflates apparent edges and the diagnostics that catch it.