Skip to content
Browse documentation
Read data / ATH documentation

ath calculate

Run named, source-separated calculations without writing athlete data.

Usage

Calendar-day bounds such as --from and --to need an explicit --timezone or a default timezone saved at ath init. Substitute the athlete's own IANA timezone, or use exact UTC timestamps instead of date-only bounds.

$ath calculate baseline hrv_rmssd --from 2026-07-01 --to 2026-09-30 --timezone America/Chicago

Operations

Supported operations are summary, baseline, trend, coverage, compare-sources, correlation, workout-drift and provider-period-summary. The command accepts named operations, not SQL.

Results name the method, exact record revisions, exclusions, sources, range and timezone or provider period. Sources are not pooled and manual sources are excluded.

Examples

Calendar calculations need an explicit or saved IANA timezone. Provider-period-summary instead requires the exact provider period type and never relabels it as a calendar day.

$ath calculate summary steps --group day --timezone America/Chicago
$ath calculate compare-sources resting_heart_rate --source <source-id> --compare-source <other-source-id>
$ath calculate provider-period-summary readiness --record-kind provider-score --period-type oura_day_unspecified

Key options

--record-kind <kind>
measurement, provider-score, provider-summary or session-summary
--period-type <type>
required provider period for provider-period-summary
--source <id>
one source only
--compare-source <id>
second source for comparison or correlation
--other-quantity <quantity>
second quantity for correlation
--session <record-id>
workout session for workout-drift
--from, --to <time>
calendar day or exact UTC bound
--timezone <name>
IANA timezone for calendar operations
--group <period>
none, day, week or month
--json
structured calculation receipt
Up nextath predict →