Dive Computers —
Algorithms, Gradient Factors,
and What Your Computer Is Actually Doing

The mathematics of safe ascent — and why the number on your wrist is a model, not a measurement

Every dive computer makes a continuous calculation about how much dissolved nitrogen your tissues are carrying and how fast you can safely ascend. Most divers trust that number completely. Fewer understand how it is produced — or what it assumes.

Dive Computers Bühlmann ZHL-16 Gradient Factors Decompression Theory
The Trust Problem
The Physics
The Algorithm
Gradient Factors
What to Look For
Your Conditions
Oxygen Tracking
The Trust Problem
The most trusted number in diving — and what produces it

Somewhere between 1960 and 1970, recreational divers stopped carrying dive tables and started trusting instruments instead. First the depth gauge, then the pressure gauge, and finally — from the late 1980s onward — the dive computer. Today, a recreational diver surfacing from a 35-metre (115-foot) dive will glance at the number on their wrist and make an immediate decision about whether it is safe to get on a plane, make another dive, or ascend directly. That number is trusted almost completely.

Most divers have no idea how it is produced. They know it involves nitrogen. They know it tells them when to stop. Beyond that, the computation is a black box.

This article opens the black box. Not because the maths is interesting — though it is — but because understanding what the computer is modelling, what assumptions it makes, and where those assumptions break down gives a diver something more valuable than a number: it gives them the judgement to use that number intelligently.

Your dive computer does not measure the nitrogen in your tissues. It models it. The distinction matters — because a model is only as good as its assumptions, and every assumption has a boundary condition where it stops being true.
A Brief History of the Problem

Decompression sickness was documented in the 1840s among workers in pressurised caissons — watertight chambers used to build bridge foundations underwater. Workers who spent hours breathing compressed air and then returned rapidly to surface pressure developed joint pain, paralysis, and in some cases died. The condition was called "caisson disease" or "the bends" — the latter because sufferers walked hunched over in pain.

John Scott Haldane, a Scottish physiologist, made the first systematic attempt to model the phenomenon in 1908. His insight was that the body does not absorb and release gas uniformly — different tissues absorb nitrogen at different rates. He proposed a series of "tissue compartments," each with its own half-time for nitrogen uptake and release, and derived the first decompression tables based on this model.

Albert Bühlmann, a Swiss physician working at the University of Zurich, refined and extended this work through the 1960s to 1980s. His ZHL-16 algorithm — published in 1983 — became the mathematical foundation for virtually every recreational dive computer made since. The number on your wrist is, in most cases, the direct output of Bühlmann's equations, modified by the computer manufacturer's implementation choices.

16
Tissue compartments modelled in Bühlmann ZHL-16, from 4-minute to 635-minute half-times
1983
Year Bühlmann published ZHL-16 — the algorithm at the heart of most dive computers today
0
Tissue compartments your computer actually measures — all values are calculated, not sensed
Gear Science Dive Computers
The Physics
Henry's Law and the gas your body absorbs
01 · Henry's Law

Henry's Law states that the amount of gas dissolved in a liquid is proportional to the partial pressure of that gas above the liquid. At the surface, your blood and tissues are in equilibrium with the nitrogen in the air you breathe — approximately 0.79 bar of nitrogen partial pressure. At 10 metres (33 feet), total ambient pressure doubles to 2 bar. The nitrogen partial pressure in the gas you breathe doubles to approximately 1.58 bar. More nitrogen now dissolves into your blood and tissues to re-establish equilibrium. At 30 metres (100 feet), the pressure is 4 bar and the nitrogen loading is proportionally higher.

This on-gassing process is not instantaneous. Different tissues absorb nitrogen at different rates, depending on their blood supply and lipid content. The brain and spinal cord equilibrate relatively quickly. Fat tissue — which has high nitrogen solubility — absorbs nitrogen slowly but holds it tenaciously. This rate difference is why the concept of tissue compartments, each with its own half-time, became the foundation of decompression theory.

The danger arises on ascent. As pressure decreases, the dissolved nitrogen must come back out. If the ascent is too rapid, the supersaturated tissues cannot off-gas quickly enough through normal respiration. The nitrogen forms bubbles in the blood and tissues — the same physical process as opening a carbonated drink. These bubbles cause decompression sickness: joint pain, neurological symptoms, and in severe cases, death.

02 · On-Gassing and Off-Gassing

A tissue compartment's half-time describes how long it takes for that tissue to absorb or release half the difference between its current nitrogen loading and the ambient equilibrium level. A compartment with a 5-minute half-time will be approximately 97% equilibrated after five half-times — 25 minutes. A compartment with a 635-minute half-time will still be off-gassing more than 44 hours after a dive.

The asymmetry between on-gassing and off-gassing is critical: gas loads faster than it unloads when you return toward a lower partial pressure. This is why repetitive diving accumulates nitrogen faster than a single dive, why surface intervals matter, and why flying within 24 hours of diving is dangerous even when the dive computer shows no ceiling. The slower compartments continue off-gassing long after the computer's NDL counter has reset.

On-gassing is driven by pressure. Off-gassing is driven by time. The dive computer tracks both — but only for the duration of its own measurement window. What happened on previous dives, the previous day, or in the previous week, is context the computer cannot fully account for.
The Diver's Angle — The Repetitive Dive Reality
A dive computer that shows no decompression obligation at the start of a dive has accounted for residual nitrogen from previous dives entered into its memory. But it cannot account for flights taken in the intervening period, dehydration, heavy exertion, alcohol, or the cumulative effect of a week of liveaboard diving on tissue saturation. The computer's model is correct within its assumptions. The diver's judgement must extend beyond them.
The Algorithm
Bühlmann ZHL-16 — compartments, M-values, and ceilings
01 · The 16 Compartments

Bühlmann's ZHL-16 algorithm models the human body as 16 parallel tissue compartments, each with its own half-time for nitrogen uptake and release. The compartments range from 4 minutes — representing fast tissues like the central nervous system — to 635 minutes, representing the slowest-loading tissues such as bone and tendon. The body does not actually contain 16 distinct biological compartments; this is a mathematical model that approximates the range of real tissue behaviour across the spectrum from fast to slow.

At any point during a dive, the computer is simultaneously calculating the nitrogen loading in all 16 compartments based on the current depth and time. Each compartment is tracking its own exponential approach to equilibrium. The compartment with the highest nitrogen load relative to its safe limit is called the controlling compartment — it is the one that determines the diver's current ceiling and no-decompression limit.

Shallow compartments dominate early in a dive. As the dive continues, slower compartments load progressively, and control passes from fast to slower compartments. This is why the no-decompression limit on a repetitive dive can be reached faster than expected — the slow compartments from the previous dive have not had time to fully off-gas, and they start the second dive already partially loaded.

Bühlmann Compartments — Nitrogen Loading Across a 30-Metre (100-Foot) Dive
Fast compartments (4–10 min)
Medium compartments (20–40 min)
Slow compartments (80+ min)
M-value limit
02 · M-Values — The Safety Ceiling

For each compartment, Bühlmann defined a maximum tolerated nitrogen partial pressure at each ambient pressure — called the M-value (maximum value). The M-value represents the theoretical threshold above which bubble formation becomes likely enough to cause decompression sickness. It is derived from empirical research, not from a precise physiological measurement, which is why the concept of a safety margin built into the algorithm is meaningful.

When any tissue compartment's nitrogen loading exceeds its M-value at the current ambient pressure, the diver has a decompression obligation — they cannot ascend further without risking bubble formation in that compartment. The dive computer calculates this in real time and displays it as a ceiling: the minimum depth the diver must maintain while off-gassing proceeds and the controlling compartment's load drops below its M-value for the next shallower depth.

The no-decompression limit (NDL) displayed on a recreational computer is the time remaining before any compartment reaches its M-value for the surface. When the NDL reaches zero, the diver cannot ascend directly to the surface without incurring a decompression obligation. A recreational dive computer is designed to keep the diver within NDL limits — in contrast to a technical computer, which will manage decompression stops if the diver exceeds them.

The Most Important Thing to Understand About M-Values
M-values are not a line between safe and dangerous. They are a model of the statistically likely threshold for bubble formation in a theoretical average diver performing average exercise in average physiological condition. A diver who is dehydrated, cold, fatigued, has a patent foramen ovale (a heart defect present in approximately 25–30% of people), or is older will reach problematic bubble formation at a lower loading than Bühlmann's M-values predict. The M-value is not a guarantee. It is a guideline derived from a model of an average person.
Gradient Factors
What the numbers actually mean — and what you trade for them

Gradient factors are a way of applying a conservatism multiplier to the Bühlmann M-values — expressed as two percentages that tell the algorithm how aggressively it can allow the diver to approach the M-value ceiling. They are one of the most misunderstood settings available on a modern dive computer, and one of the most important.

The concept was formalised by Erik Baker in the late 1990s as a tool for technical divers who wanted more control over their decompression profiles than raw Bühlmann allowed. Most modern dive computers — including many marketed to recreational divers — now expose gradient factor settings, though many divers leave them at default without understanding what they mean.

What GF Low and GF High Mean

Gradient factors are written as GF Low / GF High — for example, 30/85 or 50/85. Both numbers are percentages of the Bühlmann M-value.

GF High sets the maximum supersaturation permitted at the surface — how close to the M-value the controlling compartment is allowed to be when the diver reaches the surface. A GF High of 85 means the diver surfaces at 85% of the M-value. A GF High of 100 would mean surfacing at the exact M-value — at the theoretical limit. Most divers use GF High values between 75 and 90.

GF Low sets the maximum supersaturation permitted at the first decompression stop — typically the deepest stop. A lower GF Low means the first stop occurs deeper, allowing the slow compartments more time to off-gas before the diver ascends further. A GF Low of 30 means the first stop occurs when the controlling compartment reaches 30% of its M-value. A GF Low of 50 brings the first stop shallower.

The algorithm interpolates between GF Low (at depth) and GF High (at surface) to produce a continuously adjusted ceiling throughout the ascent. Lower GF Low values produce deeper first stops and longer decompression profiles. Lower GF High values produce more conservative surfacing conditions. Both make the dive longer and more conservative. Both reduce the statistical risk of decompression sickness.

Conservative
Lower numbers — longer dives, more protection
Deeper first stop, more time off-gassing before ascending, surfaces well below M-value. Appropriate for cold water, heavy exertion, repetitive diving, older divers, or anyone with known risk factors.
GF 30/75 or GF 40/80
Aggressive
Higher numbers — shorter dives, less margin
Shallower first stop, faster ascent permitted, surfaces closer to M-value. Produces shorter decompression profiles. Reduces the conservatism built into the algorithm — appropriate only for divers who understand the trade-off they are making.
GF 50/85 or GF 60/90
The Default Setting Reality
Some dive computers expose true gradient factors and ship with defaults at or near 100/100 — meaning no reduction from the raw Bühlmann M-values, with the algorithm running without additional conservatism. Others use proprietary conservatism levels or RGBM variants that do not map directly to GF values. In either case, the question is the same: if your computer allows GF or conservatism adjustment and you have never changed the default, it is worth understanding what that default is — and whether it reflects the conditions you actually dive in. Many experienced divers consider the factory defaults too aggressive for routine diving, particularly in cold water or on repetitive liveaboard schedules.
The Trade-Off Stated Plainly

More conservative gradient factors reduce the statistical probability of decompression sickness. They do so at the cost of longer decompression profiles — more bottom time lost to stops, longer total dive times, more gas consumed. For a recreational diver within NDL limits, this manifests as shorter NDLs and a more conservative safety stop recommendation. For a technical diver, it can mean significantly longer decompression schedules.

There is no universally correct gradient factor setting. The appropriate conservatism depends on the diver's age, physical condition, risk factors, the conditions of the dive (cold water demands more conservatism, warm water less), the gas being breathed, and how many dives have been completed recently. What is not appropriate is leaving gradient factors at their most aggressive defaults without understanding what has been left there — or, conversely, applying extremely conservative settings without understanding why the dive profile has become so much longer.

What to Look For
The specifications that determine real-world utility

Dive computer marketing emphasises features. The specifications that determine whether a computer serves you well in the water are fewer and more fundamental. These are the questions worth answering before any dive computer purchase.

Specification
Priority
Why It Matters
Algorithm & GF access
Essential
Bühlmann ZHL-16 with user-adjustable gradient factors. This is the standard. Without GF access, you cannot adjust conservatism meaningfully.
Nitrox capability
Essential
Even if you currently dive air, nitrox is a straightforward upgrade that most divers eventually make. A computer that cannot handle nitrox will need replacing sooner.
Display legibility
Essential
Numbers must be readable at depth with a mask on, in low light, and in cold water when fine motor control is reduced. Test it in a dive shop with your mask.
Battery type
Important
User-replaceable batteries (typically CR2430 or similar) allow field replacement on a liveaboard. Rechargeable computers require a charger and a power source — a meaningful constraint for expedition diving.
Air integration
Important
Wireless transmitter on the regulator first stage displays cylinder pressure on the computer. Removes need to read a separate SPG. Useful for divers who find pressure gauge reading disruptive to buoyancy management.
Gauge mode
Important
Disables the decompression algorithm and runs the computer as a depth/time gauge only — required when following a separately calculated dive plan. Useful for technical diving and planned decompression dives.
CNS oxygen tracking
Important
Tracks cumulative CNS oxygen toxicity exposure. Essential for nitrox divers. Should display as a percentage of the daily limit with a clear warning threshold.
Compass
Consider
Integrated digital compass is genuinely useful for navigation dives. Quality varies significantly between computers — ask specifically about compass accuracy and tilt compensation.
Questions Worth Asking at the Dive Shop

What algorithm does it use, and can I adjust the gradient factors? If the answer is "it has a Bühlmann-based algorithm with conservatism levels 1–5," this is not gradient factor access — it is a simplified conservative/aggressive slider. True gradient factor access exposes the GF Low and GF High values as separate adjustable numbers. These are not the same thing.

What happens when I exceed the NDL? A recreational computer should switch into decompression mode — displaying required stop depth, stop time, and ascent guidance. If the answer is "it locks you out," this is a significant limitation. A computer that locks out when limits are exceeded provides less information at the moment when more information is most needed.

How is the battery replaced, and what is the typical service interval? Some computers require manufacturer service to replace the battery and re-seal the case — a meaningful cost and delay. User-replaceable batteries with a simple O-ring seal are more practical for regular divers.

What is the dive log capacity, and does it sync to a desktop application? Depth-profile logging and desktop sync allow gradient factor decisions to be reviewed over time. Ask for the specific dive count — "plenty" is not a specification.

Your Conditions
What your diving actually requires from a computer
🌊
Recreational single-gas
Air diving, within NDL limits, to 30 metres (100 feet) or less. The standard recreational context for which most entry and mid-range computers are designed.
Algorithm: Bühlmann · GF access: useful but not critical · Nitrox: future-proof your purchase
💚
Nitrox diving
Enriched air with oxygen content above 21%. The computer must support nitrox mix setting and CNS oxygen tracking. PO₂ alarm at the correct threshold (1.4 bar working, 1.6 bar absolute maximum) is essential.
Nitrox: essential · CNS tracking: essential · PO₂ alarm: essential
📅
Repetitive and liveaboard diving
Multiple dives per day over several days. Residual nitrogen accumulates across dives. Conservative gradient factors become more important as cumulative loading increases through a trip.
GF access: important · Conservative defaults: review them · Logbook capacity: 200+ dives
🔵
Deep recreational (30–40m / 100–130ft)
NDLs shorten rapidly below 30 metres (100 feet). At 40 metres (130 feet) on air, NDL may be as short as 8–10 minutes. The computer must update quickly and display ceiling information clearly if limits are inadvertently exceeded.
Update rate: 1-second or faster · Decompression mode: essential · GF: more conservative
The Conservative Factors That Computers Cannot Model

A dive computer cannot know whether you are dehydrated, which significantly impairs nitrogen off-gassing by reducing blood flow to peripheral tissues. It cannot know whether you have a patent foramen ovale — an opening between the heart's upper chambers present in approximately 25–30% of the population — which allows venous bubbles to bypass the lung filter and enter arterial circulation directly. It cannot know your age-related reduction in cardiovascular efficiency, your pre-dive alcohol consumption, or whether you slept poorly the night before.

Cold water deserves particular attention. Vasoconstriction — the narrowing of blood vessels in response to cold — reduces peripheral blood flow and slows nitrogen off-gassing in the extremities. A diver who is cold is off-gassing more slowly than the algorithm assumes. This is one reason cold-water diving demands more conservative gradient factors than warm-water diving, and why thermal protection is a decompression variable as much as a comfort one. The physics of heat loss in water and the case for appropriate exposure protection are covered in the Exposure Protection Gear Science →

These factors do not invalidate the computer. They contextualise it. A diver who understands the model's assumptions will apply appropriate additional conservatism in their own behaviour: ascending at 9 metres (30 feet) per minute rather than the maximum 18 metres (60 feet) the computer permits; extending safety stops beyond three minutes; increasing surface intervals; and avoiding heavy exertion immediately after a dive.

The computer is a tool. The diver is the system. The diver's judgement must always extend beyond what the tool can model.

Oxygen Tracking
The number nitrox divers must never ignore

Nitrogen is the primary concern for decompression, but for nitrox divers there is a second gas to track: oxygen. At elevated partial pressures, oxygen becomes toxic to the central nervous system — causing convulsions that, underwater, are almost always fatal because the victim cannot maintain the regulator in their mouth during a convulsive episode.

The partial pressure of oxygen in a breathing gas is calculated as the fraction of oxygen multiplied by the absolute pressure. On a nitrox mix of 32% oxygen, diving to 30 metres (100 feet) — 4 bar absolute — produces an oxygen partial pressure of 0.32 × 4 = 1.28 bar. The standard recreational working limit is 1.4 bar. The absolute maximum is 1.6 bar, and most training agencies recommend never exceeding 1.4 bar for routine diving.

CNS oxygen toxicity is cumulative over the day, not just over a single dive. Each exposure at elevated PO₂ accumulates a percentage of the safe daily limit. A computer that tracks CNS % — displaying the percentage of the daily limit used — allows a nitrox diver to manage this across multiple dives. Without this tracking, a diver on multiple nitrox dives per day may approach or exceed the daily limit without awareness.

Oxygen toxicity convulsions have no warning signs in many cases. The safe operating limit is not an approximation — it is the boundary between a breathing gas and a lethal one. Track the number. Every dive.

The maximum operating depth (MOD) for any nitrox mix is the depth at which the PO₂ reaches 1.4 bar. For EANx32 (32% oxygen), MOD = (1.4 / 0.32) − 1 = 3.375 bar gauge = 33.75 metres (111 feet). For EANx36, MOD = (1.4 / 0.36) − 1 = 2.89 bar gauge = 28.9 metres (95 feet). A dive computer should calculate and display this depth automatically when the nitrox mix is entered, and it should alarm if the diver exceeds it.

The interaction between CNS oxygen tracking and NDL management is important on multi-dive nitrox days. As CNS % accumulates, the safe time at a given depth decreases — not because of nitrogen loading, but because of oxygen exposure. A good dive computer integrates both limits and displays the binding constraint clearly. A diver relying only on NDL guidance while ignoring CNS % on a nitrox day is managing only half the safety picture.

⚠️
Always verify your nitrox mix before entering the water. A cylinder labelled EANx32 that contains a higher oxygen fraction due to blending error can place the diver above the MOD without warning. Analysing the mix with an oxygen analyser before every nitrox dive is not an optional step — it is the fundamental safety check that makes nitrox diving safe. A dive computer set for the wrong mix is providing false safety information.
The Closing Thought
A dive computer is the most sophisticated instrument most recreational divers will ever own. It is performing continuous real-time calculations on a life-safety problem that stumped scientists and killed workers for a century before Haldane and Bühlmann gave us the mathematical tools to manage it. Understanding what it is doing — even at the level of this article — transforms the relationship between the diver and the device from passive trust to informed partnership. The number on your wrist is worth trusting. It is worth understanding even more.
Gear Science Dive Computers Last verified April 2026