João Gilberto Saraiva

software engineer | professor | writer


Calcpace Web: the calculator now in the browser | João Gilberto Saraiva

Calcpace Web: the calculator now in the browser

26-03-2026

The calcpace gem just hit 7,000 downloads, so I celebrated the best way I know how: I ran a 5k and finally built calcpace.app to bring those calculations to everyone, no Ruby console required.

The core logic for this project has actually been brewing in my head for about five years. Combining my daily routine as a runner with the logic I apply professionally when building delivery and routing systems, it just made perfect sense to model pace, distance, and time mathematically. I eventually sat down and started writing the core Ruby code four years ago, which evolved into the open-source gem.

When the gem crossed the 7k mark, I realized it was time to make it accessible to non-programmers.

The app provides a suite of free running tools: pace, speed, finish time, split breakdowns, and a race predictor using both the Riegel and Cameron formulas. The converter covers 30 combinations across distance, speed, and pace—km, mi, meters, yards, feet, knots—all easily switchable between metric and imperial systems.

I didn’t want it to be just another “enter your numbers” calculator. There are dedicated guide pages explaining the math behind each formula. For instance, you can read about why the Cameron predictor tends to be more conservative than Riegel for shorter base distances, and what that actually means for your training blocks.

From planning to writing the code and setting up the infrastructure, the web version took me about four days. I used this as an opportunity to build with a modern, pragmatic stack:

Take it for a spin

While the personal activity tracker (run/ride logging) is technically in closed testing, I built a sandbox and share with some friends so they can explore the UI and see the gem working in a real database environment.

To keep things tidy, a GuestResetJob runs via sidekiq-cron to wipe the guest activities and recreate the sample profile every Monday at 3 AM.

What’s Next

The engine is running smoothly, but there’s more to come. I am currently working on adding VO2max, VDOT, and training zone calculations—these will be introduced as new modules in the gem and will get their own guide pages on the site.

Links:

image