Keep score for two sides

Accumulate finite numeric scoring changes for two named sides and report the current leader.

freeworks offlinenothing uploaded
ToolScore Keeper
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Every event adds its numeric change to home or away in input order. Equal totals report a tie; otherwise the display name attached to the larger total becomes the leader.

  • A missing point amount means one, supporting ordinary one-point events.
  • Negative values remain valid for corrections and penalties rather than being silently clamped.

Worked example

Keep score for two sides
Input
											Home name: Falcons
Away name: Bears
Events: home, 2
away, 3
home, 1
										
Output
												Falcons: 3
Bears: 3
Leader: Tied
											

When to use this

Tabletop games record event sequences, scrimmages keep a sport-neutral running score, and operators enter negative corrections.

Edge cases

  • NaN and Infinity are rejected instead of contaminating every later total.
  • A side other than home or away stops processing rather than being assigned arbitrarily.
  • Identical display names collapse to one JSON key, so the two side labels must remain distinct.