Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


RunbyPace contains the core logic for calculating the target "paces" used by runners. By "runners" I mean the common humanoid biped variety, complete with oscillating appendages and prolific perspiration. :)

Build Build Status
Grade Codacy Badge
Coverage Coverage Status
Gem gem

Build history

Any sort of running program will include runs at varying paces, easy runs, distance runs, tempo runs, long runs, and then the gambit of "interval" type runs, such as 1500m pace repetitions, 5K and 10K pace reps, cruise intervals, and so on. Many runners typically consult pace tables based on their most recent time for a 5K race. So assuming your most recent 5K time was 20 minutes, and you're supposed to run a "long run", you find your most recent 5K time in the Long Run table, and it tells you that you should try to maintain a pace of 5:30-6:19 minutes per kilometer.

So this is great, but a little tedious. RunbyPace automates this whole process by calculating all of the paces for you. All you need is your current 5K time and some Ruby, and you're off running at just the right pace.

RunbyPace also encapsulates the logic and math necessary for many running-related calculations based on time, pace, speed, unit coversions, etc. If you're tired of constantly converting minutes and seconds to decimal and back again, RunbyPace is for you.

RunbyPace logo


Add this line to your application's Gemfile:

gem 'runby_pace'

And then execute:

$ bundle

Or install it yourself:

$ gem install runby_pace


I plan to craft better docs in the future, but for now the specs make for excellent class usage documentation:

For a live front end written in Rails, see It's code will be open-sourced as well, as soon as we can guarantee secure deployment.

For an open-source example front end written in Elm, see

The CLI is still in its infancy, but the gem comes with a basic CLI/REPL (bin/runbypace)


After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console or bin/runbypace for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.


Bug reports and pull requests are welcome on GitHub at

Contribute front-end and CLI ideas at @runbypace.


Crafted with care, with the support of JetBrains RubyMine

RubyMine logo


The gem is available as open source under the terms of the MIT License.


Ruby gem with the core logic for calculating running pace tables based on your most recent 5K time.







No packages published