Urgent.News

What's breaking now, across thousands of outlets.

Health & Medicine

How WHO and CDC growth percentiles are computed (the LMS method), and the edge cases we hit

I'm an emergency physician, and I also write the code behind Growo, a set of child growth calculators in 17 languages and an MCP server that AI assistants can call. Parents kept asking me what the percentile on their child's chart meant. Answering properly meant computing it the way the WHO and the CDC do, then finding every place where a correct formula still gives the wrong number. This post…

The World Health Organization (WHO) and the Centers for Disease Control and Prevention (CDC) calculate child growth percentiles using the LMS method, which stands for median (M), coefficient of variation (S), and skewness (L). This method employs a single formula to transform measurements into z-scores and then into percentiles using the standard normal cumulative distribution function (CDF).

In the case of L not equal to zero, the formula is z = ((X / M)^L - 1) / (L * S), while for L equal to zero, the formula simplifies to z = ln(X / M) / S, which represents the limit. To determine the percentile, we multiply the z-score by 100 using the standard normal CDF.

JavaScript lacks an in-built Φ function, so we use a polynomial approximation for the standard normal CDF, with an error margin of 7.5e-8. The function 'lmsZ' calculates the z-score given a measurement (X), L, M, and S. The function 'valueAtZ' does the reverse, providing the measurement corresponding to a specific z-score, L, M, and S. The web calculator counts whole days from the date of birth, hence it never encounters the issue where the WHO month length is 30.4375 days, and a one-month-old child might read a percentile 1 point higher than the actual one.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Health & Medicine

Ebola: Kenya announces second death

Kenyan health officials said the 65-year-old woman was a close relative of a man who died of Ebola last month. The woman developed symptoms while under quarantine in Nairobi.

More from Friday 23 October →