JavaScript Library

Integrate athletics scoring tables into your website and calculate points directly in the browser.

What does this library do?

The library adds three functions to your website: waVersion, waScore and waMark. Use them to convert an athletics performance into World Athletics points or, conversely, to find the equivalent performance for a given score. Everything runs directly in the user's browser: no backend, no API and no network requests are needed for the calculations.

See licences and prices

One-time payment. Instant download. Commercial use allowed.

What's included, and why

Everything in the package is there for a reason: to let you go from download to working scores in a few minutes, whatever kind of project you have.

How it's made

When you calculate scores, "almost right" isn't good enough. A single point can change a ranking. That's why this library went through a long process before I was happy to release it.

  1. From official PDFs to clean data

    World Athletics publishes the scoring tables as PDF documents. The first step was extracting every mark and turning those documents into clean, ordered data, table by table.

  2. Following the official rules

    Marks are rounded and formatted exactly as World Athletics specifies. For example, road events are scored in whole seconds, except the road mile. Many calculators skip these details, and that's where small errors creep in.

  3. From data to formulas

    The first version carried the complete tables inside the library and weighed 1.7 MB. To make it lighter, I worked out the formulas behind every table, including the events that need their own exceptions.

  4. Checked against the original

    I ran the new library and the original one, built from the official data, over every mark of every table, from the 50 metres to the mixed relays. I exported both sets of results and compared them value by value. All of them matched, and only then did I release it.

If an error is ever found, every buyer will receive the corrected version at no extra cost.

David Ballester Ribó competing in the 400-meter hurdles in the Spanish First Division in 2025
Built by an athleteI'm David Ballester Ribó. I competed in the 400 metres hurdles at the Spanish U20 Championships, and I learned JavaScript by building the calculator on this website. I made this library for the athletics community, and when you write to me, I'm the one who answers. Read the full story.

From 1.7 MB to 20 KB

The first version of the library loaded the complete scoring tables and weighed 1.7 MB. By replacing the data with the formulas behind it, the current version does exactly the same job in a fraction of the size.

  • First version100%1.7 MB
  • Current version1.2%20 KB
  • Transferred (gzip)0.3%< 5 KB
About 98.8% smaller than the first version.
20 KB
Full library, with every table and event included
Once
Each gender and event is prepared on first use and kept in memory
No requests
Calculations never need to contact an external server

A smaller file loads faster, especially on mobile devices, and lets you process thousands of results without a single server request.

What can you build with the library?

The library is designed for any website or application that needs to work with World Athletics points.

Get started with a single line of code

Want to see how simple it is? Use waScore() to convert an athletics performance into World Athletics points directly in your code.

const points = WAScore.waScore("m", "100m", "10.85");

console.log(points); // 931

The result is available immediately: 10.85 for 100 metres = 931 points.

Installation

Integrating the library into your website is simple. Download the ZIP file, choose the version that best suits your project and follow the steps below.

  1. Download the .zip file. It includes both versions of the library, working examples and the list of event identifiers.
  2. Upload the JavaScript file to your website, for example alongside the other JavaScript files in your project.
  3. Add the appropriate integration code to the page where you want to use the scoring tables.
  4. Call waScore(gender, event, performance) or waMark(gender, event, points) with your data.

The .zip file includes both versions of the library. They use the same scoring tables and provide the same functions; the only difference is how they are integrated into your project.

Classic Script

The simplest option for traditional HTML pages and projects where you want to load the library using a <script> tag.

<script src="wa-scoring-tables-2025.js"></script>
<script>
  const points = WAScore.waScore("m", "100m", "10.85");
  console.log(points); // 931
</script>

ES Module

Ideal for modern projects using JavaScript modules or tools such as Vite, Webpack or Next.js. It is also a good choice if you prefer using import.

<script type="module">
  import { waScore } from './wa-scoring-tables-2025.esm.js';

  const points = waScore("m", "100m", "10.85");
  console.log(points); // 931
</script>

API: Available functions

The library includes three main functions for checking the table version and converting between performances and World Athletics points.

Quick reference for the available functions.
FunctionDescription
waVersion()Returns the version of the scoring tables included in the library.
waScore(gender, event, performance)Converts an athletics performance into World Athletics points.
waMark(gender, event, points)Converts World Athletics points into the equivalent performance.

Parameters are provided as strings: the gender ("m", "w" or "x"), the event identifier (for example, "100m" or "HJ") and the corresponding performance or score.

Example: building a ranking

One of the most common use cases is creating a ranking from a list of results. You can automatically calculate each athlete's points and then sort the results from highest to lowest score.

const results = [
  { name: "Marc Vidal",  gender: "m", event: "100m", performance: "10.85" },
  { name: "Laia Ferrer", gender: "w", event: "800m", performance: "2:05.30" },
  // ...the rest of the results
];

const scored = results.map(r => ({
  ...r,
  points: WAScore.waScore(r.gender, r.event, r.performance)
}));

scored.sort((a, b) => b.points - a.points);

All functions are synchronous. You do not need to use await or handle promises: the result is available immediately.

Event identifiers

Each athletics event uses an identifier so that you can easily reference it from JavaScript. The ZIP file includes the complete list of all 86 events.

100m
100 Metres
400mH
400 Metres Hurdles
HJ
High Jump

No. It is an independent project that reproduces the same official World Athletics 2025 Scoring Tables.

Don't code? I'll help you install it

You don't need to be a developer to use the library. Whether your website runs on WordPress, Wix, Squarespace or was built from scratch, write to me, tell me what you want to show and I'll help you find the best way to add it.

Ask for installation help

Compatible with your project

The library uses standard JavaScript and can be integrated into any project that allows JavaScript to run.

Versions and updates

This library uses the World Athletics 2025 Scoring Tables, and you can check this at any time with waVersion().

Version
World Athletics Scoring Tables 2025
Corrections
If an error is found, every buyer receives the corrected version at no extra cost.
New tables
When World Athletics publishes new tables, I'll release a new version of the library, and previous buyers will receive a discount link.

Frequently asked questions

Does it require an Internet connection to calculate points?

No. The scoring tables are included directly in the JavaScript file you download. Once the library has loaded, calculations do not need to connect to any external server.

Does it work with WordPress, Wix or Squarespace?

Yes. The library uses standard JavaScript and can be used on these platforms as long as your setup allows you to add JavaScript. On WordPress, you can use a Custom HTML block or a suitable code-injection tool. On Wix and Squarespace, you can use their options for adding custom code.

Can I use it in commercial projects?

Yes. Both licences allow personal and commercial use. The Standard licence covers one website or application; the Professional licence covers unlimited projects.

Can I use it on websites I build for clients?

Yes, with the Professional licence. It covers every website and application you develop for clients, as long as the library is only used as part of the project you deliver.

Can I upgrade from Standard to Professional later?

Yes. Write to me and you'll only pay the difference between the two licences.

Can I use the library on multiple pages of my website?

Yes. You can load the library and use its functions on as many pages of your project as you need.

Is this an official World Athletics product?

No. It's an independent project that reproduces the official World Athletics Scoring Tables 2025. For official results, certification or claims, the official World Athletics publication always prevails.

Choose your licence

Integrate the World Athletics Scoring Tables into your website and start working with points, rankings and results without an API or backend.

Standard

€29

For a club, an athlete or your own website.

  • One website or application
  • Subdomains and testing environments included
  • Both versions, examples and the list of identifiers
  • Free corrections and email support
Buy Standard

Professional

€79

For federations, results platforms and developers.

  • Unlimited websites and applications
  • Websites you build for clients included
  • Both versions, examples and the list of identifiers
  • Free corrections and email support
Buy Professional

Not sure which one you need? Write to me and I'll help you choose.

Both licences include exactly the same library. The only difference is where you can use it. If you start with Standard and need more later, you can upgrade by paying the difference.

One-time payment. Instant download. Commercial use allowed.