Most free child height calculators lean on one of two ideas, or a mix of both. One looks at the parents. The other looks at the child's position on a growth chart. Both fit in about 20 lines of JavaScript, and once you have written them you will understand what those calculators can and cannot tell you.
This post walks through both methods, the formulas behind them, a runnable snippet, and the limits worth knowing before you put a number in front of a worried parent.
Method 1: mid-parental height (Tanner)
The simplest approach comes from J. M. Tanner and colleagues in 1970. It assumes a child's adult height is centred on the average of the parents' heights, shifted by the typical difference between men and women.
- Boys: (father + mother + 13) / 2
- Girls: (father + mother - 13) / 2
All values are in centimetres. The 13 cm is the average adult height difference between men and women. The MSD Manual's clinical calculator gives a likely range of 8.5 cm either side of that target, which it describes as about two standard deviations. The AAFP review of short and tall stature uses a rounder rule of thumb: most children end up within 10 cm of their mid-parental height.
Example: dad 175 cm, mom 162 cm. A son's target is (175 + 162 + 13) / 2 = 175 cm, with a likely range of 166.5 to 183.5 cm. A daughter's target is 162 cm.
What this method ignores is the child. A tall 9-year-old and a short 9-year-old with the same parents get the same answer.
Method 2: CDC growth-curve projection
The second approach uses the child's current height and age. The idea: children past toddlerhood tend to follow one percentile curve on the growth chart, so if your 10-year-old is on the 60th percentile today, a reasonable guess is the 60th percentile at age 20.
To do that you need the chart as numbers, not a picture. The CDC publishes exactly that. Its file statage.csv covers stature-for-age from 2 to 20 years and, for each sex and every half month of age, gives three parameters called L, M and S. M is the median height. S is a measure of spread. L corrects for skew.
With those three numbers, the CDC's own formulas convert any height into a z-score and back:
- z = ((X / M)^L - 1) / (L * S), when L is not 0
- X = M * (1 + L * S * z)^(1 / L)
The projection is two steps: compute z at the child's current age, then plug the same z into the L, M, S row for 240 months (age 20).
The code
This snippet hard-codes two rows from statage.csv so it runs on its own with node:
// Two rows from CDC statage.csv (boys): [ageMonths, L, M, S]
const BOYS_120_5 = [120.5, 0.505564115, 138.8234114, 0.047610108];
const BOYS_240 = [240, 1.167279219, 176.8492322, 0.040369574];
function midParental(father, mother, sex) {
const est = (father + mother + (sex === 'male' ? 13 : -13)) / 2;
return { est, low: est - 8.5, high: est + 8.5 };
}
const zScore = (x, [, L, M, S]) => (Math.pow(x / M, L) - 1) / (L * S);
const heightAtZ = (z, [, L, M, S]) => M * Math.pow(1 + L * S * z, 1 / L);
// A 10-year-old boy, 140 cm. Dad 180 cm, mom 165 cm.
const mp = midParental(180, 165, 'male');
const z = zScore(140, BOYS_120_5);
const projected = heightAtZ(z, BOYS_240);
console.log('mid-parental:', mp.est, `(${mp.low}-${mp.high})`);
console.log('z now:', z.toFixed(2));
console.log('percentile projection:', projected.toFixed(1));
Output:
mid-parental: 179 (170.5-187.5)
z now: 0.18
percentile projection: 178.1
Here the two methods agree to within a centimetre, which is the comfortable case. A z of 0.18 is roughly the 57th percentile.
A real implementation needs the full table, interpolation between ages, the L = 0 branch, a normal CDF to turn z into a percentile, and input checks. I put a small, dependency-free version with tests on GitHub: height-estimate. It bundles a roughly 4 KB subset of the CDC file and checks the math against the smoothed percentiles the CDC lists in the same CSV. Feed it the CDC's own 97th-percentile height and it returns 97.
When the two methods disagree
The interesting cases are the ones where the numbers diverge. Say both parents are tall but the child sits on the 25th percentile. Mid-parental height says "tall adult"; the percentile projection says "below average".
Neither number is wrong. They answer different questions. Mid-parental height is the genetic expectation. The projection assumes the child keeps their current position. A big gap between them is worth noticing, and it is one of the things doctors look at too. The AAFP review lists a projected height more than 10 cm below mid-parental height as one reason to refer to a pediatric endocrinologist.
Limits to know before you ship this
-
Ages 2 to 20 only.
statage.csvstarts at 24 months. Infants need a different chart. - Puberty timing breaks the projection. The method assumes the child stays on one percentile. An early starter can sit high on the chart for a while and then level off; a late starter can look the opposite. Be careful with ages around puberty.
- One measurement is a single point. The chart is about a curve over time, so a trend over several visits says more than one reading.
- The CDC charts are a US reference. Other populations may sit higher or lower.
- It is an estimate, not a diagnosis.
The AAFP review gives some practical red flags. After age 2, children usually track along a percentile, and variation should stay within two large bands on the chart. It lists as reasons for referral growth of less than 5 cm per year and no signs of puberty by age 14 in boys or 13 in girls. If you build a tool on these formulas, say so in plain words next to the result.
Trying it without code
If you only want a number, I built a free calculator for ages 8 to 20 that blends the mid-parental estimate with a projection from the child's current height, and widens the range when the two disagree: howtallai.com. Its projection uses a simpler share-of-adult-height table rather than the full LMS math, so the GitHub repo is the better place to see each method on its own.
References
- Tanner JM, Goldstein H, Whitehouse RH. Standards for children's height at ages 2-9 years allowing for heights of parents. Arch Dis Child. 1970;45(244):755-62. https://pubmed.ncbi.nlm.nih.gov/5491878/
- MSD Manual. Height Potential: A Child's Target Height Based on Midparental Height. https://www.msdmanuals.com/iframe/manual/medical-calculators/heightpotential.htm
- Barstow C, Rerucha C. Evaluation of Short and Tall Stature in Children. Am Fam Physician. 2015;92(1):43-50. https://www.aafp.org/pubs/afp/issues/2015/0701/p43.html
- CDC. Growth Charts: Data Files (LMS parameters and formulas). https://www.cdc.gov/growthcharts/cdc-data-files.htm
- CDC. Stature-for-age, 2 to 20 years (statage.csv). https://www.cdc.gov/growthcharts/data/zscore/statage.csv
Top comments (0)