Choose a nutrient to compare its forms by absorption, gut tolerance, cost and best clinical use.
⌕
Practitioner reference only. Ratings are relative comparisons between forms of the same nutrient, based on published absorption and tolerance data where available and clinical consensus where not — product quality, dose, timing and the individual all change real-world results. Elemental percentages are approximate and vary with hydration state and manufacturer; always use the "equivalent to" amount on the product label when it's given.
'}).join(''); $chips.innerHTML=h||'
No nutrient matches “'+esc($q.value)+'”.
'; } function bar(v,cls){var h='';for(var i=1;i';return ''+h+''} function cost(v){return ''+'$'.repeat(v)+''+'$'.repeat(3-v)+''} function pct(f){return f-1:false}}); var sorters={fit:function(a,b){return (b.fit-a.fit)||(a.i-b.i)},abs:function(a,b){return b.f[3]-a.f[3]||(b.fit-a.fit)},gi:function(a,b){return b.f[4]-a.f[4]||(b.fit-a.fit)},cost:function(a,b){return a.f[5]-b.f[5]||(b.fit-a.fit)}}; forms.sort(sorters[sortBy]); var goals=Object.keys(n.goals).map(function(g){return ''}).join(''); var cards=forms.map(function(o){var f=o.f; return '
'}).join(''); var calcForms=n.forms.map(function(f,i){return {f:f,i:i}}).filter(function(o){return o.f[2]}); var calcHTML=''; if(calcForms.length>1&&n.unit){ if(!calcForms.some(function(o){return o.i===calc.form}))calc.form=calcForms[0].i; calcHTML='
Elemental '+esc(n.unit)+' calculator
Labels in Australia usually show the compound weight and an "equiv. '+esc(n.unit)+'" amount. Use this when only the compound is listed, or to work out how much compound gives a target dose.
'+ '
'+ ''+ '
'; } $main.innerHTML='
'+esc(n.name)+'
'+n.forms.length+' forms compared
'+esc(n.intro)+'
'+ '
Quick pick: '+esc(n.quick)+'
'+ '
Highlight forms for:'+goals+'
'+ '
'+cards+'
'+calcHTML; root.querySelector('#sfc-sort').value=sortBy; updCalc(); } function updCalc(){ var out=root.querySelector('#sfc-co');if(!out)return; var f=cur.forms[calc.form],a=parseFloat(calc.amt); if(!(a>0)){out.innerHTML='Enter an amount above.';return} var r=calc.dir==='toEl'?a*f[2]:a/f[2]; var nice=r>=100?Math.round(r):r>=10?r.toFixed(1):r.toFixed(2); out.innerHTML=calc.dir==='toEl' ?'≈ '+nice+' mg elemental '+esc(cur.unit)+' in '+a+' mg of '+esc(f[0].toLowerCase())+'.' :'≈ '+nice+' mg of '+esc(f[0].toLowerCase())+' provides '+a+' mg elemental '+esc(cur.unit)+'.'; } $chips.addEventListener('click',function(e){var b=e.target.closest('[data-k]');if(!b)return; cur=N.filter(function(n){return n.k===b.dataset.k})[0];goal=null;sortBy='fit';calc={form:0,amt:500,dir:'toEl'};renderChips();renderMain()}); $q.addEventListener('input',function(){renderChips();var first=$chips.querySelector('[data-k]'); if(first&&$q.value.trim()&&first.dataset.k!==cur.k&&$chips.querySelectorAll('[data-k]').length===1){cur=N.filter(function(n){return n.k===first.dataset.k})[0];goal=null;renderChips();renderMain()}}); $main.addEventListener('click',function(e){ var g=e.target.closest('[data-g]');if(g){goal=goal===g.dataset.g?null:g.dataset.g;sortBy='fit';renderMain();return} if(e.target.closest('#sfc-cs')){var f=cur.forms[calc.form],a=parseFloat(calc.amt)||0; calc.amt=+(calc.dir==='toEl'?a*f[2]:a/f[2]).toFixed(calc.dir==='toEl'?0:0);calc.dir=calc.dir==='toEl'?'fromEl':'toEl';renderMain()} }); $main.addEventListener('change',function(e){ if(e.target.id==='sfc-sort'){sortBy=e.target.value;renderMain()} if(e.target.id==='sfc-cf'){calc.form=+e.target.value;updCalc()} }); $main.addEventListener('input',function(e){if(e.target.id==='sfc-ca'){calc.amt=e.target.value;updCalc()}}); renderChips();renderMain(); })();