math_running_pace_converter
Convert running pace and speed between min/km, min/mi, km/h, mph. Compute race splits for 5K, 10K, half, marathon. Predict finish times using the Riegel formula.
Instructions
Running Pace and Speed Converter. Convert running pace and speed, compute race split times, or predict a race time with Pete Riegel 1981 formula, selected by the operation field. convert converts one value between min/km, min/mi, km/h, and mph (pace is decimal minutes on the wire, e.g. 5.5 means 5 minutes 30 seconds). splits projects 5K, 10K, half-marathon (21.0975 km), and marathon (42.195 km) finish times from a sustained pace. predict scales a known race time to a target distance via the Riegel power law. Use math_unit_converter instead for general length/volume conversion and math_fuel_consumption_calculator for fuel economy. Pure local arithmetic: read-only, non-destructive, deterministic, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Invalid input returns HTTP 400 with an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Mode selector. convert needs value, fromUnit, toUnit. splits needs pace, paceUnit. predict needs knownDistance, knownTime, targetDistance (exponent optional). Defaults to convert when omitted. | convert |
| value | No | convert: the figure to convert. Must be greater than 0. A pace value is decimal minutes (5.5 is 5 minutes 30 seconds); a speed value is in the fromUnit. | |
| fromUnit | No | convert: unit of value. Pace units are min_per_km and min_per_mi; speed units are km_per_h and mph. | |
| toUnit | No | convert: unit to convert value into. | |
| pace | No | splits: sustained pace as decimal minutes per unit (5.5 is 5 minutes 30 seconds). Must be greater than 0. | |
| paceUnit | No | splits: unit the pace is expressed in. | |
| knownDistance | No | predict: a distance alias (km, mi, 5K, 10K, half_marathon, marathon) or an object with a positive km number. | |
| knownTime | No | predict: the achieved time as HH:MM:SS or MM:SS (a number of seconds is also accepted). Must be greater than 0. | |
| targetDistance | No | predict: distance to predict, same accepted forms as knownDistance. | |
| exponent | No | predict: Riegel fatigue exponent in the range above 0 up to 2. Defaults to 1.06. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Echo of the operation that ran (convert when omitted). | |
| data | No | Operation-specific result. convert returns fromUnit, toUnit, fromValue, toValue (numbers) plus formattedFrom, formattedTo (strings). splits returns pace, paceUnit plus a splits object keyed 5K/10K/half_marathon/marathon, each with time (string) and seconds (number). predict returns knownDistance, targetDistance (echo), knownTime, predictedTime (strings), predictedSeconds, exponent (numbers). |