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. All processing takes place directly in the user's browser: no backend, no API, and no network requests are required for calculations.
Scoring tables, directly on your website
The library lets you use the World Athletics 2025 Scoring Tables directly from JavaScript. You don't need to build a backend or send a request to a server every time you want to calculate a score.
-
No API
No account, API key, or request limits to manage.
-
No backend
All calculations are performed directly in the browser using JavaScript.
-
No external requests
The scoring tables are included in the library, so calculations do not depend on an external server.
-
Easy to integrate
Add a JavaScript file to your project and start using the functions in just a few minutes.
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.
What can you build with the library?
The library is designed for any website or application that needs to work with World Athletics points.
-
Rankings
Automatically calculate each athlete's points and create overall, club, category, or event rankings.
-
Results
Add World Athletics points directly to your competition results tables.
-
Records
Compare performances and display their equivalent points to highlight the strongest results.
-
Calculators
Build tools that convert performances into points or points into equivalent performances.
-
Competitions
Integrate scoring into websites for meetings, championships, leagues, and other athletics competitions.
-
Clubs and federations
Add scoring tables to athletics club, federation, and results-platform websites.
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. If you run into any problems, contact me and I'll help you.
- Download the
.zipfile. It includes both versions of the library and a list of the available event identifiers. - Upload the JavaScript file to your website, for example alongside the other JavaScript files in your project.
- Add the appropriate integration code to the page where you want to use the scoring tables.
- Call
waScore(gender, event, performance)orwaMark(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.
| Function | Description |
|---|---|
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 a complete list of all available events.
- 100m
- 100 metres
- 400mH
- 400 Metres Hurdles
- HJ
- High Jump
Check the list included in the .zip file for all available event identifiers.
Performance
The library is designed to handle rankings and lists containing large numbers of performances. When a gender and event combination is used for the first time, the corresponding table is processed and kept in memory for subsequent calculations.
- Once
- Initial processing per gender and event
- In memory
- Processed tables are reused for subsequent calculations
- No requests
- Calculations do not need to communicate with external servers
This allows large numbers of results to be processed without making a server request for every performance.
Compatible with your project
The library uses standard JavaScript and can be integrated into any project that allows JavaScript to run.
- HTML and JavaScript
- WordPress
- Wix
- Squarespace
- Vite
- Webpack
- Next.js
- Other JavaScript projects
Scoring table version
This version of the library uses the World Athletics 2025 Scoring Tables. The version is included in the library itself and can be checked using waVersion().
- Version
- World Athletics 2025
- Tables included
- 2025
- Updates
- New scoring tables will be released in new versions of the library
Frequently asked questions
Can I use the library if I don't know how to code?
Yes, although you will need a way to add JavaScript to your website. If you are not familiar with code, you can follow the examples on this page or contact me and I'll help you integrate it.
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.
What are the event identifiers?
The .zip file includes a list of all available event identifiers. For example, HJ corresponds to High Jump and 100m to 100 metres.
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.
Get started
Integrate the World Athletics Scoring Tables directly into your website and start working with points, rankings, and results without an API or backend. Contact me if you need help with the integration.
Download JavaScript library