Skip to content

Field notes

Count and Percent Look Alike in Apple Health but Never Convert

Both units are plain scalars, but Apple's documentation says you cannot convert between them. A short guide to reading and recording each one.

referencedataprecision
The Optimized Team· ProductUpdated Nov 17, 2026

HealthKit handles count and percent as two separate kinds of number. Both are "scalar" units, meaning plain values with no physical dimension, and they look interchangeable in a raw export. They are not. Apple's documentation states that even though count and percent are both scalar units, you cannot convert between them.

If you keep a log that pulls from Apple Health, this matters in a practical way. A column of step counts and a column of oxygen saturation readings can both look like bare numbers, but they follow different rules. Below: what each unit holds, why the two never convert, what happens when code asks for the wrong one, and what to write down so your record stays readable months from now.

Count is a raw tally#

Apple describes the count unit as a way to represent raw scalar values. The typical use is the number of times an event occurs, such as the number of steps taken or the number of times an inhaler was used. A count can also be one half of a compound unit. The "beats" in beats per minute is a count divided by a time.

Two details are worth knowing. First, HealthKit stores count values as double numbers, even though people usually read them as whole numbers. So a count in an export can carry a decimal part, and a log that assumes integers may handle it badly. Second, count quantities are often cumulative. Apple's page for step count says those samples use count units and measure cumulative values, and that the system records them automatically on iPhone and Apple Watch.

A count answers "how many." It has no ceiling, and no built-in sense of "out of what."

Percent is a fraction from 0.0 to 1.0#

Apple's page for the percent unit says it measures a value between 0.0 and 1.0. HealthKit uses it for body fat percentage, oxygen saturation, blood alcohol content, and similar values.

That range is the part that trips people up. A reading shown on screen as 97% is held as 0.97. The stored number and the displayed number differ by a factor of 100, and the scaling happens at display time. If you copy the raw value into a spreadsheet and label the column "%", you will have a column of values between 0 and 1 under a header that suggests otherwise.

The oxygen saturation page confirms the pairing: those samples measure the percentage of oxygen in the bloodstream, use percent units, and record discrete values rather than cumulative ones.

Here is how the two compare, using only what Apple's pages state.

| Quantity | Unit | Aggregation style | Stored range | |---|---|---|---| | Step count | Count | Cumulative | Any non-negative tally (stored as a double) | | Oxygen saturation | Percent | Discrete | 0.0 to 1.0 | | Body fat percentage | Percent | Not covered here | 0.0 to 1.0 |

Why two scalar units still refuse to convert#

Apple's documentation repeats the same sentence on both the count page and the percent page: they are both scalar units, and you cannot convert between them. It does not give a longer explanation, so read anything past that sentence as interpretation.

A reasonable way to think about it is meaning rather than arithmetic. A count of 40 says nothing about a whole it belongs to. A percent of 0.40 only makes sense as a share of some whole. Turning one into the other would require a denominator, and the unit system has no way to supply one. Which denominator would apply to 40 steps? The question has no general answer, so no conversion exists.

This is also why "scalar" can mislead. It describes the shape of the number (a single value, no dimension), not its meaning. Two quantities can share a shape and still belong to different families. If you want a wider picture of what else lives in an export, what an Apple Health export file actually contains lists the record types and their fields.

What happens when you ask for the wrong unit#

HealthKit quantities can be read back in any unit that is compatible with how they were stored. Apple's page for doubleValue(for:) says the method converts the quantity's value to the unit you ask for, and that you do not need to know the original unit, as long as the unit you request is compatible. If it is not compatible, the call throws an exception, specifically an invalid-argument exception.

So reading a step sample in count works, and asking for an oxygen saturation sample in count does not. The failure is loud, and that's useful. It stops code from quietly returning a number that means something other than what the caller expects.

Apple also names the safe route. To see which unit types go with which quantity sample types, check the type identifiers in HKQuantityTypeIdentifier. To check in code, call the quantity's is(compatibleWith:) method before asking for a value.

A caveat on scope: this article reflects Apple's documentation for these specific pages as retrieved in November 2026. It does not list every quantity type and its unit, and a given type's unit is something to confirm on that type's own page. For a broader look at the limits of what an app can read, see what an app gets back from HealthKit.

What to record#

None of this needs special tooling. A few habits in your own log are enough.

  • Write the unit next to every number. "97" is ambiguous. "0.97 (percent, as stored)" or "97% (shown)" is not.
  • Keep the stored form and the displayed form apart. If you keep both, give them separate columns and name each one. The related piece on what a tracking app converts covers why display units and stored units drift apart.
  • Never put count and percent in one column. Even when both are plain numbers, a column that mixes them cannot be averaged or charted in any meaningful way.
  • Expect decimals in counts. If a count column contains 4231.0, that is the double storage showing through, not a measurement error.
  • Note the aggregation style when you know it. A cumulative total and a discrete reading answer different questions, and a trend line that blends them will mislead.

OptimizedTracker keeps the unit with each value for the same reason: a number with no unit attached is hard to trust once enough time has passed. The same habit works in any spreadsheet. A single value is a data point, not a trend, and a record is only as clear as its labels.

Share

X / Twitter