Calculating Equivalent IAAF Track & Field Scores

Earlier last fall I made a site called IAAF Scores, that calculates IAAF Track & Field scores to allow you to compare different performances in many events quickly and easily. Below I'll share how the site was built.

Gathering the Data

This fall I was running a lot and had an interest in comparing my times across different distances. I knew that the IAAF puts out a table of scores for a wide range of performances in every event, and saw that a new table had come out this year. I could use this to manually compare my times but it was tedious and slow. I wanted a way to be able to compare performances quickly and easily. There were already sites like caltaf that did these comparisons for you but they are using outdated scoring tables from 2017. I decided to build my own site with the most recent 2022 scoring tables.

The scoring tables look like this:

Where each result has a corresponding score between 0-1400. For example, if you have 100m time of 10.02s, that is equal to 1199 points. And if you have a 400m time of 44.83s that is equal to 1192 points. So, you could conclude that your 100m time is comparatively better than your 400m time. My first thought to do these comparisons quickly was to copy all of the data into lookup tables, and then just do a lookup for each performance or score. The problem with this approach is that the scoring tables are only available as a PDF, and it has 1000s of pages. So there is no easy or practical way of parsing all the data into lookup tables.

Finding the Formulas with Basic Algebra

Luckily, I came across this post, How to calculate IAAF points?, on stack exchange which explained that each event has a formula for calculating the score of a result.

The formula looks like this:

where t is the time in seconds and a, b, and c are coefficients specific to each event. Since there are three coefficients in the formula, we only need 3 data points from an event to be able to calculate the coefficients. A bit of algebra tells us that given 3 times; t1, t2, and t3 for the scores of 1200, 600, and 300 points in any event, we can calculate that events coefficients as:

Note: You can use any 3 scores as long as they are each double each other (e.g. scores of 480, 240, and 120) would also work.

For example, for the men's outdoor 100m the times that correspond to 1200, 600, and 300 points are 10.02, 12.06, and 13.51 seconds. So, we can calculate the 100m coefficients as:

So the formula for calculating points for a given 100m time is:

Note: I've rounded the numbers here, but the precise values are used in the calculator.

There are a lot of events (136 of them) so it was a bit tedious to record 408 performances, but at least it was a quick and easy way to get accurate results.

For field events, the formula is slightly different:

where d is the distance in centimeters.

This meant that given three distances; d1, d2, and d3 for scores of 1200, 600 and 300 points in an event, the coefficient calculations look like this:

So now I had an easy way to calculate the score for a given performance in any event or vice versa. Nice!

Putting it Together

With this strategy I was able to quickly copy and paste many results at a time into CSV files, and then use a Python script to calculate the coefficients. I wanted a nice interface that I could use to compare many performances in different events. The site I made for it is IAAF Scores. I made the frontend with Svelte, which was my first time using it. It was pretty nice and easy to build with, but I think that's in part because the site is so simple. I'm not sure I'd be able to build a larger app with it without investing much more time in learning it. For the backend, since there is only one calculation being done that takes in a couple parameters, I decided to use AWS Lambda functions. This was also my first time using Lambda, and I found it nice and easy to work with. It's nice to not have to focus on setting up and managing a server when you just need a simple calculation done. I'd definitely consider using it again in a future project.

If you'd like to use the site, it's here. If you're interested in seeing more technical details, you can read the source code on Github here. Thanks for reading!