Polar Running Index
Calculate Polar Running Index (VO2max estimate) from FIT files.
Running Index estimates your maximal oxygen uptake (VO2max) from heart rate and speed data recorded during a run. It is based on the algorithms described in Polar's patents US2007082789 / EP1795128 and the ACSM metabolic equations for running.
Requirements
- Python >= 3.11
- uv
Installation
git clone https://github.com/willianpaixao/polar-running-index.git
cd polar-running-index
uv sync
Usage
uv run polar-running-index <FIT_FILE> --hr-max <MAX_HR> --hr-rest <REST_HR>
You must provide your maximum heart rate (--hr-max) and resting heart
rate (--hr-rest) in bpm. These are needed to compute the heart rate reserve
used in the VO2max estimation.
Example
$ uv run polar-running-index activity.FIT --hr-max 190 --hr-rest 50
==================================================
Running Index Report
==================================================
Activity: Running (Treadmill)
Date: 2026-03-04 18:07:54 UTC
Duration: 1h 4m 21s
Distance: 12.02 km
Avg Speed: 11.2 km/h (5:20 min/km)
Avg HR: 157 bpm
Max HR: 167 bpm
Parameters: HRmax=190, HRrest=50
--------------------------------------------------
Running Index: 52.6
Method: Heart Rate Reserve + Drift Correction
Level: Good
--------------------------------------------------
Statistics:
Mean: 52.6
Median: 52.4
Std Dev: 1.7
Min: 48.8
Max: 57.5
Samples: 3393 used, 28 outliers removed
==================================================
Segment analysis
Use --segments to see Running Index broken down per segment. If the FIT file
contains multiple laps, lap boundaries are used. Otherwise, the activity is
split into per-kilometer segments.
$ uv run polar-running-index activity.FIT --hr-max 190 --hr-rest 50 --segments
...
Segments:
Km 1: RI 55.5 | 5:33 /km | HR 141 | 153s
Km 2: RI 52.6 | 5:25 /km | HR 150 | 324s
Km 3: RI 50.9 | 5:26 /km | HR 155 | 326s
Km 4: RI 51.0 | 5:23 /km | HR 157 | 325s
...
Comparison with Polar Flow
Use --polar-ri to compare the calculated value against the official Running
Index from Polar Flow:
$ uv run polar-running-index activity.FIT --hr-max 190 --hr-rest 50 --polar-ri 58
...
Comparison with Polar:
Polar RI: 58.0
Calculated: 52.6
Difference: -5.4 (9.3% lower)
Options
| Flag | Description |
|---|---|
--hr-max |
Maximum heart rate in bpm (required) |
--hr-rest |
Resting heart rate in bpm (required) |
--method {hrr,hrmax_ratio} |
Algorithm variant (default: hrr) |
--no-drift-correction |
Disable cardiac drift correction |
--polar-ri |
Official Polar RI for comparison |
--segments |
Show per-segment Running Index breakdown |
--json |
Output results as JSON |
Algorithm methods
hrr(default) -- Heart Rate Reserve method (Karvonen). Uses both max and resting HR to estimate what fraction of aerobic capacity is being used. More accurate across different fitness levels.hrmax_ratio-- Simple HRmax ratio method. Uses only max HR. Simpler but less accurate for individuals with unusually high or low resting heart rates.
Both methods include cardiac drift correction by default, which compensates for
the natural rise in heart rate over time at constant effort. Disable it with
--no-drift-correction if you prefer raw estimates.
How it works
- Parse the FIT file to extract per-second heart rate and speed records.
- Filter to the valid window (3--60 minutes into the run, speed > 6 km/h).
- Estimate VO2 demand at the current speed using the ACSM running equation.
- Extrapolate to VO2max using the heart rate reserve ratio.
- Correct for cardiac drift by fitting a linear HR trend and normalizing to a 12-minute reference point.
- Remove outliers (IQR method) and average the remaining estimates.
The final Running Index value is an estimate of VO2max in ml/kg/min.
References
- Polar Running Index White Paper (April 2021)
- Patent US2007082789 / EP1795128 -- Method for determining performance
- ACSM's Guidelines for Exercise Testing and Prescription (metabolic equations)
- Swain & Leutholtz (1997) -- %HRR approximates %VO2R
Metadata
Release files for polar-running-index 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polar_running_index-1.0.0.tar.gz | 314.6 kB | With provenance | Details for polar_running_index-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polar_running_index-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for polar_running_index-1.0.0-py3-none-any.whl |
Total release size: 332.0 kB
Release files / polar_running_index-1.0.0.tar.gz
| Download URL | polar_running_index-1.0.0.tar.gz |
|---|---|
| Size | 314.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
358c7c0fd110377d67a90817a9dcaa6186d4238334894891125d78356031d3b4
|
|
BLAKE2b-256 checksum How to use checksums |
3ca083cc1904727d5641d72dd3421e8039f31401ba114237ccac4d5b78719c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logRelease files / polar_running_index-1.0.0-py3-none-any.whl
| Download URL | polar_running_index-1.0.0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08c989fbc0aa645f39f5a0036f9862d1b9931a3d090080c5785afb294175ce78
|
|
BLAKE2b-256 checksum How to use checksums |
d82d987bbc5fb7ee11bdfe9ca645606e793c28922e739cf948aed5b4ad80421a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logSecurity for polar-running-index 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for polar_running_index-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.