<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: liubinpm</title>
    <description>The latest articles on DEV Community by liubinpm (@liubinpm).</description>
    <link>https://dev.to/liubinpm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4181888%2F5c78a219-81db-4e6e-8b16-57216fc278f7.png</url>
      <title>DEV Community: liubinpm</title>
      <link>https://dev.to/liubinpm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/liubinpm"/>
    <language>en</language>
    <item>
      <title>How to estimate a child's adult height: the mid-parental method vs. CDC growth-curve projection</title>
      <dc:creator>liubinpm</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:48:17 +0000</pubDate>
      <link>https://dev.to/liubinpm/how-to-estimate-a-childs-adult-height-the-mid-parental-method-vs-cdc-growth-curve-projection-2klg</link>
      <guid>https://dev.to/liubinpm/how-to-estimate-a-childs-adult-height-the-mid-parental-method-vs-cdc-growth-curve-projection-2klg</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: mid-parental height (Tanner)
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Boys: (father + mother + 13) / 2&lt;/li&gt;
&lt;li&gt;Girls: (father + mother - 13) / 2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: CDC growth-curve projection
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;To do that you need the chart as numbers, not a picture. The CDC publishes exactly that. Its file &lt;code&gt;statage.csv&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;With those three numbers, the CDC's own formulas convert any height into a z-score and back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;z = ((X / M)^L - 1) / (L * S), when L is not 0&lt;/li&gt;
&lt;li&gt;X = M * (1 + L * S * z)^(1 / L)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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).&lt;/p&gt;

&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;This snippet hard-codes two rows from &lt;code&gt;statage.csv&lt;/code&gt; so it runs on its own with &lt;code&gt;node&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Two rows from CDC statage.csv (boys): [ageMonths, L, M, S]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BOYS_120_5&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;120.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.505564115&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;138.8234114&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.047610108&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BOYS_240&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="mf"&gt;1.167279219&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;176.8492322&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.040369574&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;midParental&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;father&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;mother&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;est&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;father&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;mother&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sex&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;male&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;est&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;low&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;est&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;8.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;high&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;est&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;8.5&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;zScore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[,&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;S&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;L&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;S&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;heightAtZ&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[,&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;S&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;M&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;S&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;L&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// A 10-year-old boy, 140 cm. Dad 180 cm, mom 165 cm.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;midParental&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;165&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;male&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;zScore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;140&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;BOYS_120_5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;projected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;heightAtZ&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;BOYS_240&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mid-parental:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;est&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;low&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;mp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;high&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;z now:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;percentile projection:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;projected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mid-parental: 179 (170.5-187.5)
z now: 0.18
percentile projection: 178.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the two methods agree to within a centimetre, which is the comfortable case. A z of 0.18 is roughly the 57th percentile.&lt;/p&gt;

&lt;p&gt;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: &lt;a href="https://github.com/liubinpm/height-estimate" rel="noopener noreferrer"&gt;height-estimate&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the two methods disagree
&lt;/h2&gt;

&lt;p&gt;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".&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits to know before you ship this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ages 2 to 20 only.&lt;/strong&gt; &lt;code&gt;statage.csv&lt;/code&gt; starts at 24 months. Infants need a different chart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Puberty timing breaks the projection.&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One measurement is a single point.&lt;/strong&gt; The chart is about a curve over time, so a trend over several visits says more than one reading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The CDC charts are a US reference.&lt;/strong&gt; Other populations may sit higher or lower.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It is an estimate, not a diagnosis.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying it without code
&lt;/h2&gt;

&lt;p&gt;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: &lt;a href="https://howtallai.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=backlink_trial_202610" rel="noopener noreferrer"&gt;howtallai.com&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Tanner JM, Goldstein H, Whitehouse RH. Standards for children's height at ages 2-9 years allowing for heights of parents. &lt;em&gt;Arch Dis Child&lt;/em&gt;. 1970;45(244):755-62. &lt;a href="https://pubmed.ncbi.nlm.nih.gov/5491878/" rel="noopener noreferrer"&gt;https://pubmed.ncbi.nlm.nih.gov/5491878/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MSD Manual. Height Potential: A Child's Target Height Based on Midparental Height. &lt;a href="https://www.msdmanuals.com/iframe/manual/medical-calculators/heightpotential.htm" rel="noopener noreferrer"&gt;https://www.msdmanuals.com/iframe/manual/medical-calculators/heightpotential.htm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Barstow C, Rerucha C. Evaluation of Short and Tall Stature in Children. &lt;em&gt;Am Fam Physician&lt;/em&gt;. 2015;92(1):43-50. &lt;a href="https://www.aafp.org/pubs/afp/issues/2015/0701/p43.html" rel="noopener noreferrer"&gt;https://www.aafp.org/pubs/afp/issues/2015/0701/p43.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CDC. Growth Charts: Data Files (LMS parameters and formulas). &lt;a href="https://www.cdc.gov/growthcharts/cdc-data-files.htm" rel="noopener noreferrer"&gt;https://www.cdc.gov/growthcharts/cdc-data-files.htm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CDC. Stature-for-age, 2 to 20 years (statage.csv). &lt;a href="https://www.cdc.gov/growthcharts/data/zscore/statage.csv" rel="noopener noreferrer"&gt;https://www.cdc.gov/growthcharts/data/zscore/statage.csv&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>health</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Tell Your Face Shape From a Selfie</title>
      <dc:creator>liubinpm</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:34:03 +0000</pubDate>
      <link>https://dev.to/liubinpm/how-to-tell-your-face-shape-from-a-selfie-3aa8</link>
      <guid>https://dev.to/liubinpm/how-to-tell-your-face-shape-from-a-selfie-3aa8</guid>
      <description>&lt;p&gt;Most haircut advice starts with "know your face shape", and then skips the part where you actually find it out. Holding a phone up to a mirror and squinting at the outline of your face rarely settles it. You end up somewhere between "oval" and "round" and pick whichever sounds nicer.&lt;/p&gt;

&lt;p&gt;This post walks through a more repeatable way: four measurements, a few rules of thumb for seven common shapes, and the places where a selfie-based estimate goes wrong. At the end there is a small JavaScript function that turns the four numbers into a guess, in case you want to play with the rules yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four measurements
&lt;/h2&gt;

&lt;p&gt;You can take these with a soft tape measure, or on a straight-on photo with any image editor that shows pixel coordinates. Pixels are fine: only the ratios matter, so you never need to convert to centimeters.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Forehead width.&lt;/strong&gt; Measure across the widest part of the forehead, roughly halfway between the eyebrows and the hairline, from one temple to the other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cheekbone width.&lt;/strong&gt; Find the highest point of each cheekbone (usually just below the outer corner of the eye) and measure straight across.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jaw width.&lt;/strong&gt; Measure from one jaw angle to the other. The jaw angle is the corner below each ear where the jaw turns forward toward the chin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Face length.&lt;/strong&gt; Measure from the center of the hairline down to the tip of the chin.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Write all four down. If you are working on a photo, mark the points first and then measure, so you are not tempted to nudge a line toward the answer you expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seven shapes and how to tell them apart
&lt;/h2&gt;

&lt;p&gt;These are rules of thumb used in hair and styling guides, not anatomical categories. Real faces sit on a continuum, and a lot of people land between two shapes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Oval.&lt;/strong&gt; The face is clearly longer than it is wide (often described as about one and a half times). Cheekbones are the widest line, the forehead is slightly wider than the jaw, and the jaw is rounded rather than angular.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Round.&lt;/strong&gt; Length and width are close to equal. Cheekbones are the widest point, and the jawline is soft with no visible corner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Square.&lt;/strong&gt; Length and width are also close, but forehead, cheekbones and jaw are all about the same width, and the jaw has a sharp, visible angle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oblong (rectangle).&lt;/strong&gt; The face is noticeably long, and the three widths are similar to each other. Think of a square that has been stretched vertically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heart.&lt;/strong&gt; The forehead is the widest part, and the face narrows steadily to a narrow, sometimes pointed chin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diamond.&lt;/strong&gt; Cheekbones are clearly wider than both the forehead and the jaw, which are narrower and similar to each other. The chin is often pointed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triangle (pear).&lt;/strong&gt; The jaw is the widest line and the forehead is the narrowest, the reverse of a heart.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two checks do most of the work. First, which of the three widths is the largest? That alone separates heart, diamond and triangle from the rest. Second, how long is the face compared with its widest line? That separates round and square from oval and oblong.&lt;/p&gt;

&lt;p&gt;Round versus square is the one pair the numbers cannot decide. Both have similar length and width. The difference is the jaw corner, so you have to look at it: a defined angle below the ear points to square, a smooth curve points to round.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small function to try the rules
&lt;/h2&gt;

&lt;p&gt;Here is the logic above as code. The thresholds (5%, 10%, 1.2, 1.4) are my own picks to make the rules concrete. They are not from a study, so treat them as knobs to adjust.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Rough rules of thumb, not a validated model.&lt;/span&gt;
&lt;span class="c1"&gt;// All four widths/lengths must use the same unit (cm or pixels).&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;guessFaceShape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;forehead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;angularJaw&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;forehead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// how long vs. how wide&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;near&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;jaw&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;forehead&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;triangle&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;forehead&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;forehead&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;heart&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cheekbones&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;forehead&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.1&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;diamond&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;even&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;near&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;forehead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cheekbones&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;near&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cheekbones&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;jaw&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ratio&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;even&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oblong&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oval&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ratio&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mf"&gt;1.2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;angularJaw&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;square&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;round&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oval&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;guessFaceShape&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;forehead&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;cheekbones&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;jaw&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;angularJaw&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; "oval"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you run your own numbers and the answer flips when you change one measurement by a few millimeters, that is useful information: you are close to a boundary, and both shapes are worth reading about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why selfie estimates go wrong
&lt;/h2&gt;

&lt;p&gt;Whether you measure by hand or let a tool do it, the input photo is usually the weakest link. The common error sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lens distortion.&lt;/strong&gt; Phone front cameras are wide-angle. Held close, they enlarge the middle of the face and shrink the sides, so cheekbones and jaw look narrower than they are. Hold the phone at arm's length or farther, or have someone take the photo from a distance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head tilt and rotation.&lt;/strong&gt; Tipping the chin up or down changes the apparent face length. Turning even slightly to one side narrows the far half of the face. Look straight into the lens with your head level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hairline.&lt;/strong&gt; Bangs, a receding hairline or hair pulled forward make the top of the face a guess, which affects both face length and forehead width. Pull hair back for the photo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hair and beards over the edges.&lt;/strong&gt; Hair falling over the cheeks or a full beard along the jaw hides exactly the lines you need to measure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expression.&lt;/strong&gt; A wide smile pushes the cheeks out; an open mouth adds length. Use a neutral face with the mouth closed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconsistent points.&lt;/strong&gt; "The widest part of the forehead" is a judgment call. Measure twice on separate photos and see if you get the same answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Borderline faces.&lt;/strong&gt; Many faces genuinely fall between two shapes. A single label hides that, so treat the result as "mostly X, a bit of Y" and read the advice for both.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Turning the result into a haircut
&lt;/h2&gt;

&lt;p&gt;The usual principle behind face-shape advice is balance: add volume where the face is narrow and keep it away from where the face is widest.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Round: height on top and length below the chin; avoid volume at cheek level.&lt;/li&gt;
&lt;li&gt;Square: soft layers or waves around the jaw to take the edge off the corners.&lt;/li&gt;
&lt;li&gt;Oblong: bangs and width at the sides to shorten the overall line.&lt;/li&gt;
&lt;li&gt;Heart: volume around the chin and side-swept bangs to balance a wider forehead.&lt;/li&gt;
&lt;li&gt;Diamond: fringe to widen the forehead, fullness near the jaw.&lt;/li&gt;
&lt;li&gt;Triangle: volume at the crown and temples to balance a wider jaw.&lt;/li&gt;
&lt;li&gt;Oval: most cuts work; choose by hair texture and upkeep.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you would rather not mark points by hand, I built &lt;a href="https://hair-tryon-f0w.pages.dev/?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=launch_hair-tryon_202610" rel="noopener noreferrer"&gt;HairTryOn&lt;/a&gt;, a free face shape detector that runs in the browser: it estimates your face shape from a selfie and shows haircuts that tend to suit it. The photo is processed on your device and not uploaded. It is subject to every error source in the list above, so a well-lit, straight-on photo still matters.&lt;/p&gt;

&lt;p&gt;Whichever way you measure, take the result as a starting point for a conversation with your hairdresser, not a rule.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
