# ath calculate

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

Website: https://ath.fit/docs/calculate/
Markdown: https://ath.fit/docs/calculate.md

ATH v1.0.0 · MIT license. Documentation source: [7cd6a09](https://github.com/mwhitham/ath/blob/7cd6a097dbf2a12c7ea8a319869d4e0bb0def96b/src/program.ts). If your installed version differs, check its command help.

Checked 18 October 2026: v1.0.0 is available on npm.

## 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.

```text
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.

```text
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

| Argument or option | Description |
| --- | --- |
| `--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 |
