---
title: Comparisons
---


## Introduction

Comparisons are part of [Sahha Insights](/docs/products/insights). They provide context to daily scores or biomarkers by comparing them with relevant reference groups, helping to understand if values are typical, high, or low compared to global averages, similar demographic cohorts, or personal historical baselines.

---

## List of Comparisons

{% data-table height=400 searchable=true badges="Category" badgeColors="score:green,biomarker:cyan" %}

| Name | Category | Description | Unit | isHigherBetter |
| ---- | -------- | ----------- | ---- | -------------- |
| **wellbeing** | score | Holistic health combining sleep and activity | `index` | `true` |
| **activity** | score | Physical activity and movement levels | `index` | `true` |
| **sleep** | score | Overall sleep quality | `index` | `true` |
| **readiness** | score | Body's recovery state and preparedness for exertion | `index` | `true` |
| **mental_wellbeing** | score | Mental wellbeing state based on behavioral patterns | `index` | `true` |
| **steps** | biomarker | Daily step count | `count` | `true` |
| **sleep_duration** | biomarker | Total time spent asleep | `minute` | `true` |
| **heart_rate_resting** | biomarker | Resting heart rate | `bpm` | `false` |
| **heart_rate_variability_sdnn** | biomarker | HRV measured as SDNN | `ms` | `true` |
| **heart_rate_variability_rmssd** | biomarker | HRV measured as RMSSD | `ms` | `true` |
| **vo2_max** | biomarker | Maximum oxygen uptake | `mL/kg/min` | `true` |

{% /data-table %}

Browse our [comprehensive data dictionary](/docs/get-started/data-dictionary) to view all available outputs beyond just comparisons.

---

## How It Works

Comparisons provide three distinct reference points to contextualize metric values:

- **Global:** Comparison against global population averages.
- **Demographic:** Comparison against people with similar characteristics (e.g., age and gender).
- **Baseline:** Comparison against an individual's historical average over the last 30 days.

Comparisons are calculated daily, and include:

- The reference group's average value
- Percentile position within the group (not applicable for baseline)
- Absolute and percentage differences compared to the individual's value
- A descriptive state label (`very_low`, `low`, `average`, `high`, `very_high`) based on the percentile position

---

## Output Schema

Each comparison is scoped to a single profile and metric, calculated daily, and provides a snapshot of the profile's values relative to the three comparison groups.

{% api-example %}

{% api-panel %}
{% api-property field="id" type="UUID" description="Unique identifier for the comparison" /%}
{% api-property field="type" type="string" description="Always set to comparison" /%}
{% api-property field="category" type="string" description="One of score or biomarker" /%}
{% api-property field="name" type="string" description="Metric being compared (e.g., readiness)" /%}
{% api-property field="value" type="float" nullable=true description="Your value for this metric" /%}
{% api-property field="unit" type="string" description="Unit of the metric (e.g., index, bpm, count)" /%}
{% api-property field="isHigherBetter" type="boolean" nullable=true description="Whether higher values are better" /%}
{% api-property field="periodicity" type="string" description="Frequency of calculation (daily)" /%}
{% api-property field="startDateTime" type="datetime" description="Start of the daily window" /%}
{% api-property field="endDateTime" type="datetime" description="End of the daily window" /%}
{% api-property field="data" type="ComparisonData[]" description="List of comparisons (global, demographic, baseline)" /%}
{% api-property field="createdAtUtc" type="datetime" description="UTC timestamp when calculated" /%}
{% api-property field="version" type="float" description="Version of comparisons" /%}
{% /api-panel %}

```json {% title="Example Response" %}
{
	"type": "comparison",
	"category": "score",
	"name": "readiness",
	"value": 0.75,
	"unit": "index",
	"isHigherBetter": true,
	"periodicity": "daily",
	"startDateTime": "2025-04-02T00:00:00+04:00",
	"endDateTime": "2025-04-02T23:59:59+04:00",
	"data": [
		{
			"type": "demographic",
			"value": 0.71,
			"percentile": 58,
			"state": "average",
			"properties": { "ageMin": 30, "ageMax": 44, "gender": "female" }
		},
		{ "type": "global", "value": 0.78, "percentile": 42, "state": "average" },
		{
			"type": "baseline",
			"value": 0.84,
			"percentile": null,
			"difference": -0.09,
			"properties": { "windowDays": 30 }
		}
	],
	"createdAtUtc": "2025-04-06T09:30:00Z"
}
```

{% /api-example %}

{% api-panel badge="Object" name="ComparisonData" description="Each entry in the data array contains:" %}
{% api-property field="type" type="string" description="Comparison group: global, demographic, baseline" /%}
{% api-property field="value" type="float" nullable=true description="Reference group's average value" /%}
{% api-property field="percentile" type="integer" nullable=true description="Your percentile rank (null for baseline)" /%}
{% api-property field="difference" type="float" nullable=true description="Absolute difference from your value" /%}
{% api-property field="percentageDifference" type="float" nullable=true description="Relative percentage difference" /%}
{% api-property field="state" type="string" description="Comparison category: very_low, low, average, high, very_high" /%}
{% api-property field="properties" type="object" nullable=true description="Additional info (demographic details or baseline window)" /%}
{% /api-panel %}

---

## Getting Started

{% action-cards %}

{% action-card icon="code" href="/docs/connect/api" title="API" description="Query comparisons via GET /api/v1/profile/insight/comparison" /%}

{% action-card icon="bell" href="/docs/connect/webhooks" title="Webhooks" badge="Coming Soon" badgeColor="amber" description="Receive daily comparison updates automatically" /%}

{% /action-cards %}

---

## Support

For assistance with Comparisons or the Insights product, contact us at [support@sahha.ai](mailto:support@sahha.ai) or join the [Sahha Slack Community](https://join.slack.com/t/sahhacommunity/shared_invite/zt-1w0fmfbvk-qUwQ83tJgXyjT9XSxJvKIw).
