<?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: Atif Khan</title>
    <description>The latest articles on DEV Community by Atif Khan (@atif_khan_44a3a0c86bec43b).</description>
    <link>https://dev.to/atif_khan_44a3a0c86bec43b</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3470881%2Faa82aa09-db82-40eb-a855-ad30be05f6e6.jpg</url>
      <title>DEV Community: Atif Khan</title>
      <link>https://dev.to/atif_khan_44a3a0c86bec43b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atif_khan_44a3a0c86bec43b"/>
    <language>en</language>
    <item>
      <title>Building a BMI &amp; Body Fat Percentage Calculator with ChatGPT</title>
      <dc:creator>Atif Khan</dc:creator>
      <pubDate>Sun, 31 Aug 2025 10:16:24 +0000</pubDate>
      <link>https://dev.to/atif_khan_44a3a0c86bec43b/bmi-body-fat-percentage-calculator-489m</link>
      <guid>https://dev.to/atif_khan_44a3a0c86bec43b/bmi-body-fat-percentage-calculator-489m</guid>
      <description>&lt;p&gt;As developers, we often look for projects that are both &lt;strong&gt;practical&lt;/strong&gt; and &lt;strong&gt;good learning experiences&lt;/strong&gt;. Recently, I built a &lt;strong&gt;BMI &amp;amp; Body Fat Percentage Calculator&lt;/strong&gt; with the help of ChatGPT.&lt;/p&gt;

&lt;p&gt;This tool lets users calculate their &lt;strong&gt;Body Mass Index (BMI)&lt;/strong&gt; and &lt;strong&gt;body fat percentage&lt;/strong&gt; instantly, and it’s live on my website: &lt;a href="https://bmikalkulatorr.com" rel="noopener noreferrer"&gt;bmikalkulatorr.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While health and fitness might seem outside the core world of coding, projects like these are a great way to practice working with formulas, input handling, and user experience design.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I wanted to create a tool that’s &lt;strong&gt;simple, accurate, and useful in daily life&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It was a chance to learn how AI (ChatGPT) can assist in &lt;strong&gt;writing logic and formulas&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;I also wanted to share it with the community, since &lt;strong&gt;open knowledge and collaboration&lt;/strong&gt; are the heart of DEV.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How the Calculator Works
&lt;/h2&gt;

&lt;p&gt;The tool takes four inputs from the user:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Height (in inches)&lt;/li&gt;
&lt;li&gt;Weight (in kilograms)&lt;/li&gt;
&lt;li&gt;Age (in years)&lt;/li&gt;
&lt;li&gt;Gender (male/female)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From there, it calculates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;BMI Value &amp;amp; Category&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Body Fat Percentage &amp;amp; Category&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Core Formulas
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;BMI Calculation:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;$$&lt;br&gt;
BMI = \frac{weight \ (kg)}{height^2 \ (m^2)}&lt;br&gt;
$$&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Body Fat Percentage (Adults):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Male: &lt;code&gt;(1.20 × BMI) + (0.23 × Age) - 16.2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Female: &lt;code&gt;(1.20 × BMI) + (0.23 × Age) - 5.4&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Body Fat Percentage (Teens):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Male: &lt;code&gt;(1.51 × BMI) - (0.70 × Age) - 2.2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Female: &lt;code&gt;(1.51 × BMI) - (0.70 × Age) + 1.4&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example Run
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Input:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Height: 72 inches&lt;/li&gt;
&lt;li&gt;Weight: 80 kg&lt;/li&gt;
&lt;li&gt;Age: 30 years&lt;/li&gt;
&lt;li&gt;Gender: Male&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;BMI: &lt;strong&gt;23.9&lt;/strong&gt; → &lt;em&gt;Normal Weight&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Body Fat %: &lt;strong&gt;19.4%&lt;/strong&gt; → &lt;em&gt;Average&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI as a Coding Partner:&lt;/strong&gt; ChatGPT helped speed up development by generating boilerplate code and formula logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Math in Code:&lt;/strong&gt; Projects like this are great practice for working with real-world equations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practical Impact:&lt;/strong&gt; Even a small program can be genuinely useful to people outside the dev community.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;p&gt;👉 You can try the live version here: &lt;a href="https://bmikalkulatorr.com" rel="noopener noreferrer"&gt;BMI &amp;amp; Body Fat Calculator&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;As developers, we often build tools just for fun or practice, but sometimes those projects turn into something practical and helpful.&lt;/p&gt;

&lt;p&gt;This calculator is my way of combining &lt;strong&gt;learning, coding, and sharing knowledge&lt;/strong&gt; with the wider community. If you’re interested, check out my project — and maybe try building your own version with a different tech stack!&lt;/p&gt;

&lt;p&gt;Happy coding ❤️&lt;/p&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>testing</category>
      <category>chatgpt</category>
    </item>
  </channel>
</rss>
