Home › Games & Betting Math › Elo Rating Calculator
Elo Rating Calculator
Computes the expected score of two players from their Elo ratings with the logistic formula E = 1/(1 + 10^((R_b − R_a)/400)) and the rating change of each after a win, draw or loss for a given K-factor.
When to use
You want the win expectancy between two rated players or the new ratings after a result, for chess or any Elo-based ranking (games, sports, matchmaking).
Do not use when: The rating system uses a different scale or rating deviations (Glicko, TrueSkill), or you need ratings after a whole tournament with FIDE's rounding and 400-point rule. Mathematics only; not gambling advice.
Formula
E_a = 1 / (1 + 10^((rating_b − rating_a) / 400)); E_b = 1 − E_a; new_rating_a = rating_a + k_factor × (S_a − E_a); new_rating_b = rating_b + k_factor × (S_b − E_b); S = 1 for a win, 0.5 for a draw, 0 for a loss
Standard logistic Elo formula (Elo 1978) in which a 400-point difference gives the stronger player an expected score of about 0.91. FIDE reads E from a table and counts differences above 400 points as 400; both differ from this formula by at most a few hundredths of a rating point per game. Probability mathematics only; not gambling advice.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
rating_a | number | yes | Current Elo rating of player A. Range: ≥ 0, ≤ 4000 | |
rating_b | number | yes | Current Elo rating of player B (the opponent). Range: ≥ 0, ≤ 4000 | |
result | enum: a_wins | draw | b_wins | yes | Outcome of the game from player A's point of view. | |
k_factor | number | default 32 | Maximum rating change per game. FIDE uses 40 (new players and juniors), 20 (established) and 10 (rated 2400+); 32 is common in club and online systems. Range: ≥ 1, ≤ 200 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
expected_score_a | number | E_a = 1/(1 + 10^((rating_b − rating_a)/400)). | |
expected_score_b | number | E_b = 1 − E_a. | |
new_rating_a | number | rating_a + k_factor × (S_a − E_a) with S_a = 1, 0.5 or 0. | |
new_rating_b | number | rating_b + k_factor × (S_b − E_b). | |
change_a | number | k_factor × (S_a − E_a). | |
change_b | number | k_factor × (S_b − E_b) = −change_a. | |
win_probability_a_percent | number | % | E_a × 100: A's expected score as a percentage (the win probability when draws are impossible). |
Example
1500 beats 1600, K = 32: {"rating_a":1500,"rating_b":1600,"result":"a_wins","k_factor":32} → {"expected_score_a":0.3599,"expected_score_b":0.6401,"new_rating_a":1520.48,"new_rating_b":1579.52,"change_a":20.48,"change_b":-20.48,"win_probability_a_percent":35.99}
2000 draws with 1800, K = 20: {"rating_a":2000,"rating_b":1800,"result":"draw","k_factor":20} → {"expected_score_a":0.7597,"change_a":-5.19,"new_rating_a":1994.81,"new_rating_b":1805.19}
GET https://tttkmbb.com/api/v1/calculate/elo-rating?rating_a=1500&rating_b=1600&result=a_wins&k_factor=32
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/elo-rating(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/elo-rating · Markdown: https://tttkmbb.com/gaming/elo-rating.md · JSON definition: https://tttkmbb.com/gaming/elo-rating.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="elo-rating" - OpenAPI operationId:
calculate_elo_rating - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Elo rating system (Wikipedia) (reference)
- FIDE Handbook – B.02 FIDE Rating Regulations (fide.com) (standard)
FAQ
Which K-factor should I use?
The one your rating system prescribes: FIDE 40/20/10 by experience and rating, USCF a rating-dependent formula, many online chess and game servers 16–32. A larger K makes ratings move faster.
Does the expected score equal the win probability?
Only when draws cannot happen. In chess E_a = P(win) + ½·P(draw), so a 0.36 expected score can be, for example, 25 % wins and 22 % draws.
Why is FIDE's published change slightly different?
FIDE reads the expected score from a table rounded to two decimals, caps rating differences at 400 points and rounds the sum of a tournament's changes, so individual games can differ by a fraction of a point.
Related calculators
- Bet Expected Value Calculator — Use the win expectancy as the probability estimate for a price on the game.
- Probability of Two Events Calculator — Combine win probabilities of several games.
- Percentage Calculator — Percent arithmetic on scores and expectancies.