Percentile rank calculator

When grades come out I try to convert my ranks into percentiles. (It's hard to say what 335th means until you know 335th of how many.) In the past I've divided my rank by the number of games in the event, because that number is easy to get, but what with different numbers of games competing in each category I've never quite trusted my back of the envelope math. There was only one thing to do: write a script to pull down all the grades for the entire event from the API and run the calculations properly.
If anyone else wants to use it: https://jacobwinters.com/ld-percentile-calculator/