Skip to main content

Badminton ELO Rating System

3 min 552 words

One of my favorite ways to stay active is playing badminton with friends. What started as casual games has grown into a regular community of players, and I wanted to create something to make our matches even more engaging.

The ELO Rating System

I built a doubles badminton ELO rating system for our community. For those unfamiliar, ELO is a mathematical rating system originally designed for chess that calculates relative skill levels based on match outcomes. The core principle: when you defeat a higher-rated opponent, your rating increases more than if you beat someone with a lower rating.

How ELO Calculations Work

The system uses these formulas to maintain fair ratings:

Expected Win Probability: EA=11+10(RBRA)/400E_A = \frac{1}{1 + 10^{(R_B - R_A)/400}}

Where:

  • EAE_A = Expected score for player/team A (probability of winning)
  • RAR_A = Current rating of player/team A
  • RBR_B = Current rating of player/team B

Rating Update After Match: RA=RA+K×(SAEA)R'_A = R_A + K \times (S_A - E_A)

Where:

  • RAR'_A = New rating for player/team A
  • KK = K-factor (maximum rating change per match, typically 32)
  • SAS_A = Actual score (1 for win, 0 for loss)
  • EAE_A = Expected score from formula above

Adapting ELO for Doubles

Since badminton is played in doubles (2v2), I adapted the system:

  1. Team Rating: Sum of both players’ individual ratings

    • Team A rating = Player 1 + Player 2
    • Team B rating = Player 3 + Player 4
  2. Rating Distribution: The total ELO change is split equally between teammates

    • If a match exchanges 24 ELO points, each winner gains +12 and each loser loses -12
  3. Upset Detection: Matches where the lower-rated team wins by ≥17 ELO points are highlighted as “Underdog victories”

The Implementation

After each match, players submit results through a simple web form. The system automatically:

  • Fetches current ELO ratings from the database
  • Calculates expected win probabilities for both teams
  • Computes the rating adjustments based on the actual outcome
  • Updates individual player ratings
  • Records match history with ELO changes

All players start at 1500 ELO (the standard starting point), and ratings evolve naturally over time based on performance.

Features

The system includes several pages:

Submit Match - Password-protected form where players report results

Rankings - Live leaderboard showing current ELO ratings and games played

Match History - Chronological view of all matches with:

  • Team compositions
  • ELO point exchanges
  • Rivalry tracking (teams that play 3+ times)
  • Time-based grouping (this week, last week, etc.)
  • Head-to-head records

Privacy & Positivity

I designed the interface with privacy and positivity in mind:

  • Match details are collapsed by default
  • Uses “Team A/B” instead of “Winners/Losers”
  • Shows relative dates (“2 days ago”) rather than exact timestamps
  • Celebrates underdog victories without shaming losses
  • Neutral color schemes (no red/green for win/loss)

What’s Next

The foundation is solid, and I’m considering additions like:

  • Player profiles with detailed statistics
  • Performance trend visualizations
  • Tournament bracket support
  • Season-based ratings resets

For now, it’s serving its purpose - making our badminton sessions more engaging and giving everyone a way to track improvement over time.


Interested in the technical implementation? The system uses Astro + TypeScript for the frontend and Supabase (PostgreSQL) for data persistence.