<?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: Health World Web Editorial</title>
    <description>The latest articles on DEV Community by Health World Web Editorial (@healthworldwebeditorial).</description>
    <link>https://dev.to/healthworldwebeditorial</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%2F4278465%2Fed8d1a09-5029-46fc-86a8-48294351dcb6.png</url>
      <title>DEV Community: Health World Web Editorial</title>
      <link>https://dev.to/healthworldwebeditorial</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/healthworldwebeditorial"/>
    <language>en</language>
    <item>
      <title>Spermidine supplement labels: what to check before you read the claims</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Sat, 05 Dec 2026 21:05:45 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/spermidine-supplement-labels-what-to-check-before-you-read-the-claims-3cfg</link>
      <guid>https://dev.to/healthworldwebeditorial/spermidine-supplement-labels-what-to-check-before-you-read-the-claims-3cfg</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: written by the Health World Web editorial team, who publish &lt;a href="https://www.healthworldweb.com/" rel="noopener noreferrer"&gt;healthworldweb.com&lt;/a&gt; and the sister site &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;healthysupplements.us&lt;/a&gt;. This post has no affiliate links. Some pages on our site do, with a disclosure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Spermidine supplements are often marketed for hair. Before you buy one, it helps to read what the label actually gives you and what the research does and does not show.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check on the label
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The source and form, for example wheat germ extract.&lt;/li&gt;
&lt;li&gt;Milligrams of spermidine per serving, not the weight of the extract.&lt;/li&gt;
&lt;li&gt;Serving size and servings per container.&lt;/li&gt;
&lt;li&gt;Any allergen statement, since wheat germ is a common source.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we cover
&lt;/h2&gt;

&lt;p&gt;Our guide on &lt;a href="https://www.healthworldweb.com/spermidine-hair-growth/" rel="noopener noreferrer"&gt;spermidine and hair growth&lt;/a&gt; goes through the evidence in plain language. For comparing bottles, use the formula: cost per serving = final price / servings per container, or try the free &lt;a href="https://www.healthworldweb.com/supplement-cost-per-serving-calculator/" rel="noopener noreferrer"&gt;cost per serving calculator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;More label notes are in the &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;Healthy Supplements US label guide&lt;/a&gt;. General information, not medical advice.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>New on Health World Web: December 5 reading list</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Sat, 05 Dec 2026 06:17:24 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/new-on-health-world-web-december-5-reading-list-3l33</link>
      <guid>https://dev.to/healthworldwebeditorial/new-on-health-world-web-december-5-reading-list-3l33</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: written by the Health World Web editorial team, who publish &lt;a href="https://www.healthworldweb.com/" rel="noopener noreferrer"&gt;healthworldweb.com&lt;/a&gt; and the sister site &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;healthysupplements.us&lt;/a&gt;. This post has no affiliate links. Some pages it links to do, with a disclosure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Health World Web editorial here. These are the articles we published or updated in the last day. Each is written for US readers and explains what a product or ingredient is, what the label says and what to check before you buy. Some pages on the site contain affiliate links, and they carry a disclosure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/nmnh-benefits/" rel="noopener noreferrer"&gt;NMNH benefits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/does-nicotinamide-riboside-work/" rel="noopener noreferrer"&gt;Does nicotinamide riboside work?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/nmnh-dosage/" rel="noopener noreferrer"&gt;NMNH dosage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-mitochondrial-formula-review/" rel="noopener noreferrer"&gt;Advanced Mitochondrial Formula review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/circo2-review/" rel="noopener noreferrer"&gt;CircO2 review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-amino-formula-review/" rel="noopener noreferrer"&gt;Advanced Amino Formula review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-joint-support-review/" rel="noopener noreferrer"&gt;Advanced Joint Support review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-collagen-plus-review/" rel="noopener noreferrer"&gt;Advanced Collagen Plus review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-vision-formula-review/" rel="noopener noreferrer"&gt;Advanced Vision Formula review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/tonicgreens-review/" rel="noopener noreferrer"&gt;TonicGreens review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/advanced-memory-formula-review/" rel="noopener noreferrer"&gt;Advanced Memory Formula review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/kollagen-intensiv-review/" rel="noopener noreferrer"&gt;Kollagen Intensiv review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/nicotinamide-riboside-vs-niacin/" rel="noopener noreferrer"&gt;Nicotinamide riboside vs niacin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/collagen-cream-vs-supplements/" rel="noopener noreferrer"&gt;Collagen cream vs supplements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthworldweb.com/is-nmn-worth-it/" rel="noopener noreferrer"&gt;Is NMN worth it?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For label-reading basics, see the &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;Healthy Supplements US label guide&lt;/a&gt; and the &lt;a href="https://www.healthworldweb.com/" rel="noopener noreferrer"&gt;Health World Web glossary&lt;/a&gt;. Both sites belong to the editorial team that wrote this post. This post itself has no affiliate links. General information, not medical advice.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Supplement cost per serving: the formula and the label edge cases</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Sat, 05 Dec 2026 03:05:42 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/supplement-cost-per-serving-the-formula-and-the-label-edge-cases-5f83</link>
      <guid>https://dev.to/healthworldwebeditorial/supplement-cost-per-serving-the-formula-and-the-label-edge-cases-5f83</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: written by the Health World Web editorial team, who publish &lt;a href="https://www.healthworldweb.com/" rel="noopener noreferrer"&gt;healthworldweb.com&lt;/a&gt; and the sister site &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;healthysupplements.us&lt;/a&gt;. No affiliate links.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A supplement label has two numbers that people mix up: the serving size and the servings per container. If you build anything that parses or compares labels, model both, and never store "capsules per bottle" as if it were servings.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost formula
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;cost_per_serving&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;final_price&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;servings_per_container&lt;/span&gt;
&lt;span class="n"&gt;cost_per_active_unit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cost_per_serving&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;amount_per_serving&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the final price after shipping and tax if you can. Use the same unit for the active amount, for example mg of elemental magnesium, not mg of the compound.&lt;/p&gt;

&lt;h2&gt;
  
  
  Edge cases worth handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Serving size of 2 or more capsules.&lt;/li&gt;
&lt;li&gt;Amount in mcg on one bottle and mg on another (1 mg = 1,000 mcg).&lt;/li&gt;
&lt;li&gt;Vitamin D in IU versus mcg (1 mcg = 40 IU).&lt;/li&gt;
&lt;li&gt;Proprietary blends that list only a total weight.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We keep a free browser calculator at &lt;a href="https://www.healthworldweb.com/supplement-cost-per-serving-calculator/" rel="noopener noreferrer"&gt;healthworldweb.com&lt;/a&gt; and plain-language label notes at &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;healthysupplements.us&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>health</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A small JSON shape for supplement facts panels (and why serving size and basis matter)</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Thu, 03 Dec 2026 09:01:42 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/a-small-json-shape-for-supplement-facts-panels-and-why-serving-size-and-basis-matter-3lmh</link>
      <guid>https://dev.to/healthworldwebeditorial/a-small-json-shape-for-supplement-facts-panels-and-why-serving-size-and-basis-matter-3lmh</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: written by the Health World Web editorial team, who publish &lt;a href="https://www.healthworldweb.com/" rel="noopener noreferrer"&gt;healthworldweb.com&lt;/a&gt; and the sister site &lt;a href="https://www.healthysupplements.us/" rel="noopener noreferrer"&gt;healthysupplements.us&lt;/a&gt;. No affiliate links.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you build anything that reads supplement labels, such as a price comparer or a nutrition tracker, you need a data shape for the Supplement Facts panel. This is a small JSON structure that avoids the usual mistakes, with the reasons for each field.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"product"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Example Magnesium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"serving_size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"amount"&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="nl"&gt;"unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"capsule"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"servings_per_container"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"ingredients"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Magnesium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"magnesium citrate"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"mg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"basis"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"elemental"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"percent_dv"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;18.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"USD"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"includes_tax_shipping"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why these fields
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;serving_size is an object.&lt;/strong&gt; Every amount on the panel is per serving. Storing "2 capsule" as text makes cost per serving hard to compute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;form and basis.&lt;/strong&gt; "Magnesium (as magnesium citrate) 200 mg" is an elemental amount. "Magnesium citrate 500 mg" is the compound weight. Without &lt;code&gt;basis&lt;/code&gt; you will compare numbers that mean different things.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;percent_dv can be null.&lt;/strong&gt; Many ingredients have no established daily value, so null must be allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;price carries its basis.&lt;/strong&gt; Compare final prices, with tax and shipping, or the ranking is wrong.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost per serving
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;servings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;servings_per_container&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;costPerServing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nf"&gt;servings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a user takes half a serving, divide the amounts and multiply the servings by two before comparing.&lt;/p&gt;

&lt;p&gt;The label-reading rules behind this are in the &lt;a href="https://www.healthysupplements.us/how-to-read-a-supplement-label-directions-storage/" rel="noopener noreferrer"&gt;label guide&lt;/a&gt;, and a free browser tool that does the cost arithmetic is the &lt;a href="https://www.healthworldweb.com/supplement-cost-per-serving-calculator/" rel="noopener noreferrer"&gt;cost per serving calculator&lt;/a&gt;. For batch lab reports, see the &lt;a href="https://www.healthworldweb.com/supplement-certificate-of-analysis-guide/" rel="noopener noreferrer"&gt;certificate of analysis guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>json</category>
      <category>webdev</category>
      <category>health</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why the number in a supplement's name is a poor guide to the dose</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Wed, 02 Dec 2026 17:50:36 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/why-the-number-in-a-supplements-name-is-a-poor-guide-to-the-dose-1hi9</link>
      <guid>https://dev.to/healthworldwebeditorial/why-the-number-in-a-supplements-name-is-a-poor-guide-to-the-dose-1hi9</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I write for the Health World Web editorial team. We run healthworldweb.com and the sister site healthysupplements.us, both linked below. No affiliate links in this post.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A supplement label tells you three different amounts in three different places. The product name says one number. The Supplement Facts panel gives the amount per serving. The serving size tells you how many capsules make up that serving. If you compare only the name, you can be off by a factor of two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three examples from public label records
&lt;/h2&gt;

&lt;p&gt;These come from the NIH Dietary Supplement Label Database, which prints what each label states:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A product named "NMN 250 mg" lists 250 mg per 2-capsule serving, which is 125 mg per capsule.&lt;/li&gt;
&lt;li&gt;A product named "Boost (NMN) 125 mg" lists 250 mg per 2-capsule serving.&lt;/li&gt;
&lt;li&gt;A product named "NMN Plus" lists nicotinamide riboside (NR) as its active ingredient, not NMN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this says one product is better. It says the name is a poor guide to the dose, so read the serving line. We put 12 NMN, NR and spermidine labels side by side, with a source link for each row: &lt;a href="https://hwweditorial.wordpress.com/2026/12/02/supplement-label-audit-what-12-nmn-nr-and-spermidine-labels-actually-state/" rel="noopener noreferrer"&gt;Supplement label audit&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small check you can run in code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;per_capsule_mg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mg_per_serving&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;capsules_per_serving&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;mg_per_serving&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;capsules_per_serving&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;per_capsule_mg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;250&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="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 125.0 mg per capsule&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then compare servings, not bottles. Total servings = bottles x capsules per bottle / capsules per serving. Cost per serving = final price / total servings. Our free &lt;a href="https://www.healthworldweb.com/supplement-cost-per-serving-calculator/" rel="noopener noreferrer"&gt;cost per serving calculator&lt;/a&gt; does the arithmetic in the browser and stores nothing. The starting numbers in it are fictional.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not cover
&lt;/h2&gt;

&lt;p&gt;Reading a label is not testing a product. A certificate of analysis for the exact lot is a separate check: &lt;a href="https://www.healthworldweb.com/supplement-certificate-of-analysis-guide/" rel="noopener noreferrer"&gt;how to read a certificate of analysis&lt;/a&gt;. For a general walkthrough of the label panels, see the guide on our sister site: &lt;a href="https://www.healthysupplements.us/how-to-read-a-supplement-label-directions-storage/" rel="noopener noreferrer"&gt;how to read a supplement label&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is not medical advice and not a dosing guide. Do not change how much you take based on a price or a name.&lt;/p&gt;

</description>
      <category>supplements</category>
      <category>python</category>
      <category>health</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Cost per serving: a small formula (and JS function) for comparing supplement prices</title>
      <dc:creator>Health World Web Editorial</dc:creator>
      <pubDate>Wed, 02 Dec 2026 12:03:03 +0000</pubDate>
      <link>https://dev.to/healthworldwebeditorial/cost-per-serving-a-small-formula-and-js-function-for-comparing-supplement-prices-4fhf</link>
      <guid>https://dev.to/healthworldwebeditorial/cost-per-serving-a-small-formula-and-js-function-for-comparing-supplement-prices-4fhf</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I write for the Health World Web editorial team, which runs the free calculator linked below.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A lower bottle price is not always a lower price per serving. Bottles hold different counts, and labels define a "serving" differently. A bottle with 60 capsules and a 2-capsule serving gives 30 servings. The same bottle with a 1-capsule serving gives 60.&lt;/p&gt;

&lt;p&gt;The math is simple enough to write in a few lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total servings = bottles x capsules per bottle / capsules per labeled serving
cost per serving = total price / total servings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the final price for that exact quantity, including shipping, tax and discounts, and use the same currency for every option.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small JavaScript version
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;costPerServing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;totalPrice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bottles&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;perBottle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;perServing&lt;/span&gt; &lt;span class="p"&gt;}&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="n"&gt;servings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bottles&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;perBottle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;perServing&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;totalPrice&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;servings&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Fictional example numbers, not real products&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;costPerServing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;totalPrice&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bottles&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;span class="n"&gt;perBottle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;perServing&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="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="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;costPerServing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;totalPrice&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bottles&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;span class="n"&gt;perBottle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;perServing&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;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&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="n"&gt;a&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 1.00&lt;/span&gt;
&lt;span class="nb"&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="n"&gt;b&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 0.60&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this made-up case, option A is cheaper per bottle ($30 vs $36) but costs more per serving ($1.00 vs $0.60).&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not tell you
&lt;/h2&gt;

&lt;p&gt;Cost per serving compares price only. It says nothing about ingredient amounts, quality, safety or health benefits, and it is not a dosing recommendation. Compare label directions and ingredient amounts separately. Do not change how much you take to lower the cost.&lt;/p&gt;

&lt;p&gt;Edge cases the simple formula does not cover: powders, liquids, variable serving ranges, and labels without a capsule or tablet count. Subscription prices that change after the first order are also not covered unless you enter them.&lt;/p&gt;

&lt;h2&gt;
  
  
  A no-code version
&lt;/h2&gt;

&lt;p&gt;If you do not want to write code, we built a free calculator that does the same arithmetic in the browser. Inputs are not stored and no account is needed: &lt;a href="https://www.healthworldweb.com/supplement-cost-per-serving-calculator/" rel="noopener noreferrer"&gt;Supplement Cost Per Serving Calculator&lt;/a&gt;. The starting numbers in it are fictional examples.&lt;/p&gt;

&lt;p&gt;Before buying, a testing report is a separate check worth reading. It should match the exact product and lot, and it does not prove a health benefit.&lt;/p&gt;

&lt;p&gt;Related reading: our sister site Healthy Supplements Hub, also published by the Health World Web editorial team, has a guide on &lt;a href="https://www.healthysupplements.us/how-to-read-a-supplement-label-directions-storage/" rel="noopener noreferrer"&gt;how to read a supplement label&lt;/a&gt;. No affiliate link.&lt;/p&gt;

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