Chessigma

For AI agents: the documentation index is at https://www.chessigma.com/llms.txt, and this page is available as Markdown at https://www.chessigma.com/developers/api/elo-calculator.md.

Developers / API

Elo calculator API

Calculate the new rating and the point change after one game, from both players' ratings and the result.

Compute an Elo rating change for a single game

GET https://www.chessigma.com/public-api/v1/elo-calculator

Pure arithmetic. Returns the new rating, point change, and expected score.

Query parameters

yourRating integer, 100 to 4000, required

Your rating before the game.

opponentRating integer, 100 to 4000, required

Your opponent's rating before the game.

result string, one of win, draw, loss, required

The game's result for you.

system string, one of fide, chesscom, lichess, default fide, optional

The rating system whose default K-factor applies.

kFactor integer, 1 to 100, optional

Override the default K-factor for the chosen system.

Example request

curl "https://www.chessigma.com/public-api/v1/elo-calculator?yourRating=1500&opponentRating=1400&result=win"

Example response

200 Computed rating change

{
  "yourRating": 1500,
  "opponentRating": 1400,
  "result": "win",
  "system": "fide",
  "kFactor": 20,
  "expectedScore": 0.6401,
  "newRating": 1507,
  "change": 7
}

Response fields

yourRating integer
opponentRating integer
result string, one of win, draw, loss
system string, one of fide, chesscom, lichess
kFactor integer

The K-factor used: kFactor if you passed one, otherwise the system's default.

expectedScore number

Probability of scoring, from 0 to 1.

newRating integer

Your rating after the game.

change integer

newRating minus yourRating.

Errors

  • 400 Invalid query parameters
  • 429 Rate limit exceeded

Errors and limits

  • Every error is a JSON object whose error field says what went wrong.
  • All endpoints share one limit of 30 requests a minute across every caller, with no API key. Over it the API answers 429 with a Retry-After header in seconds.
  • Please attribute Chessigma when you use the API. By using it you accept the terms of service.

More endpoints