<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>calculator &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:calculator</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:37:54 +0000</pubDate>
    <item>
      <title>Solute calculator</title>
      <link>https://personaljournal.ca/paulsutton/solute-calculator-c98y</link>
      <description>&lt;![CDATA[Solute calculator&#xA;&#xA;This is a basic Python program to calculate how much solute is needed to make a particular concentration of a chemical for a given solution.&#xA;&#xA;Enter mass of chemical, volume and concentration required.  Program will calculate required solute needed.&#xA;&#xA;Chemical solute calculator&#xA;print(&#34;Chemical solute calculator&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;This program will ask you for some basic data and will then calculate how much solute is needed for a given volume and concentration&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;1 mol solution is formula weight in 1 liter of water&#34;)&#xA;print(&#34;&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Mass is the molecular mass of the chemical solution you&#39;re making e.,g Copper Sulfate is 249g&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Volume the total solution volume in litres,  100ml is written as 0.100&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Concentration required in Mols&#34;)&#xA;print(&#34; &#34;)&#xA;mass = input (&#34;Mass in g: &#34;) &#xA;print(&#34;Solute requred&#34;)&#xA;volume = input(&#34;Volume in l: &#34;)&#xA;print((volume) + &#34; l&#34;)&#xA;conc = input (&#34;Required Concentration in M: &#34;) &#xA;&#xA;solute = float(mass)  float(volume)  float(conc)&#xA;print(&#34;Solute required: &#34;)&#xA;print(str(solute) + &#34; g&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Note:  This program is a guide, and you should double check calculations&#34;)&#xA;There is a better online solution to this here&#xA;&#xA;Program 2&#xA;&#xA;This is a related ruby program to calculate different molar masses&#xA;&#xA;molar weight calculator&#xA;puts &#34;molecular weight calculator&#34;&#xA;puts&#xA;print &#34;Enter Weight: &#34;&#xA;weight = gets&#xA;print (&#34;Weight :&#34;); &#xA;print (weight)&#xA;puts &#xA;print (&#34;0.5 Mol: &#34;)&#xA;print weight.tof / 2&#xA;puts&#xA;print (&#34;2 Mol: &#34;)&#xA;print weight.toi  2&#xA;puts &#xA;print (&#34;4 Mol: &#34;)&#xA;print weight.toi  4&#xA;puts&#xA;puts &#xA;print (&#34;End&#34;)&#xA;&#xA;Enter a molecular weight, and it will calculate 1/2, 2 and 4 moles accordingly.   It is not perfect,  just works.&#xA;&#xA;Tags&#xA;&#xA;#Science,#Chemistry,#Calculator,#Mole,#Solution,#Solute&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Solute calculator</p>

<p>This is a basic Python program to calculate how much solute is needed to make a particular concentration of a chemical for a given solution.</p>

<p>Enter mass of chemical, volume and concentration required.  Program will calculate required solute needed.</p>

<pre><code>#Chemical solute calculator
print(&#34;Chemical solute calculator&#34;)
print(&#34; &#34;)
print(&#34;This program will ask you for some basic data and will then calculate how much solute is needed for a given volume and concentration&#34;)
print(&#34; &#34;)
print(&#34;1 mol solution is formula weight in 1 liter of water&#34;)
print(&#34;&#34;)
print(&#34; &#34;)
print(&#34;Mass is the molecular mass of the chemical solution you&#39;re making e.,g Copper Sulfate is 249g&#34;)
print(&#34; &#34;)
print(&#34;Volume the total solution volume in litres,  100ml is written as 0.100&#34;)
print(&#34; &#34;)
print(&#34;Concentration required in Mols&#34;)
print(&#34; &#34;)
mass = input (&#34;Mass in g: &#34;) 
#print(&#34;Solute requred&#34;)
volume = input(&#34;Volume in l: &#34;)
print((volume) + &#34; l&#34;)
conc = input (&#34;Required Concentration in M: &#34;) 

solute = float(mass) * float(volume) * float(conc)
print(&#34;Solute required: &#34;)
print(str(solute) + &#34; g&#34;)
print(&#34; &#34;)
print(&#34;Note:  This program is a guide, and you should double check calculations&#34;)
</code></pre>

<p>There is a better online solution to this <a href="https://www.physiologyweb.com/calculators/molar_solution_concentration_calculator.html" rel="nofollow">here</a></p>

<p>Program 2</p>

<p>This is a related ruby program to calculate different molar masses</p>

<pre><code># molar weight calculator
puts &#34;molecular weight calculator&#34;
puts
print &#34;Enter Weight: &#34;
weight = gets
print (&#34;Weight :&#34;); 
print (weight)
puts 
print (&#34;0.5 Mol: &#34;)
print weight.to_f / 2
puts
print (&#34;2 Mol: &#34;)
print weight.to_i * 2
puts 
print (&#34;4 Mol: &#34;)
print weight.to_i * 4
puts
puts 
print (&#34;End&#34;)

</code></pre>

<p>Enter a molecular weight, and it will calculate ½, 2 and 4 moles accordingly.   It is not perfect,  just works.</p>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Science" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Science</span></a>,<a href="/paulsutton/tag:Chemistry" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Chemistry</span></a>,<a href="/paulsutton/tag:Calculator" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Calculator</span></a>,<a href="/paulsutton/tag:Mole" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Mole</span></a>,<a href="/paulsutton/tag:Solution" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Solution</span></a>,<a href="/paulsutton/tag:Solute" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Solute</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/solute-calculator-c98y</guid>
      <pubDate>Sat, 07 Dec 2024 09:05:54 +0000</pubDate>
    </item>
    <item>
      <title>Solute calculator</title>
      <link>https://personaljournal.ca/paulsutton/solute-calculator</link>
      <description>&lt;![CDATA[Solute calculator&#xA;&#xA;There is website tool for calculating the amount of solute needed for a given volume and concentration.   This can be found here&#xA;&#xA;I just put this together in python3&#xA;&#xA;V2.0&#xA;&#xA;Chemical solute calculator&#xA;print(&#34;Chemical solute calculator&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;This program will ask you for some basic data and will then calculate how much solute is needed for a given volume and concentration&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;1 mol solution is formula weight in 1 liter of water&#34;)&#xA;print(&#34;&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Mass is the molecular mass of the chemical solution you&#39;re making e.,g Copper Sulfate is 249g&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Volume the total solution volume in litres,  100ml is written as 0.100&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Concentration required in Mols&#34;)&#xA;print(&#34; &#34;)&#xA;mass = input (&#34;Mass in g: &#34;) &#xA;print(&#34;Solute requred&#34;)&#xA;volume = input(&#34;Volume in l: &#34;)&#xA;print((volume) + &#34; l&#34;)&#xA;conc = input (&#34;Required Concentration in M: &#34;) &#xA;&#xA;solute = float(mass)  float(volume)  float(conc)&#xA;print(&#34;Solute required: &#34;)&#xA;print(str(solute) + &#34; g&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;Note:  This program is a guide, and you should double check calculations&#34;)&#xA;&#xA;Chemical solute calculator&#xA;print(&#34;Chemical solute calculator&#34;)&#xA;print(&#34; &#34;)&#xA;print(&#34;This program will ask you for some basic data and then calculate how much solute is needed for a given volume and concentration&#34;)&#xA;print(&#34; &#34;)&#xA;mass = input (&#34;Mass in g: &#34;) &#xA;print(&#34;Solute requred&#34;)&#xA;volume = input(&#34;Volume in l: &#34;)&#xA;print((volume) + &#34; l&#34;)&#xA;conc = input (&#34;Required Concentration in M: &#34;) &#xA;&#xA;solute = float(mass)  float(volume)  float(conc)&#xA;print(solute)&#xA;&#xA;Note: This is just meant to work and perform a single function.  I have not added error checking, so values are numerical. &#xA;&#xA;Tags&#xA;&#xA;#Calculator,#Solute,#Chemistry,#Solution,#Volume,#Mols&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Solute calculator</p>

<p>There is website tool for calculating the amount of solute needed for a given volume and concentration.   This can be <a href="https://www.physiologyweb.com/calculators/molar_solution_concentration_calculator.html" rel="nofollow">found here</a></p>

<p>I just put this together in python3</p>

<p>V2.0</p>

<pre><code>#Chemical solute calculator
print(&#34;Chemical solute calculator&#34;)
print(&#34; &#34;)
print(&#34;This program will ask you for some basic data and will then calculate how much solute is needed for a given volume and concentration&#34;)
print(&#34; &#34;)
print(&#34;1 mol solution is formula weight in 1 liter of water&#34;)
print(&#34;&#34;)
print(&#34; &#34;)
print(&#34;Mass is the molecular mass of the chemical solution you&#39;re making e.,g Copper Sulfate is 249g&#34;)
print(&#34; &#34;)
print(&#34;Volume the total solution volume in litres,  100ml is written as 0.100&#34;)
print(&#34; &#34;)
print(&#34;Concentration required in Mols&#34;)
print(&#34; &#34;)
mass = input (&#34;Mass in g: &#34;) 
#print(&#34;Solute requred&#34;)
volume = input(&#34;Volume in l: &#34;)
print((volume) + &#34; l&#34;)
conc = input (&#34;Required Concentration in M: &#34;) 

solute = float(mass) * float(volume) * float(conc)
print(&#34;Solute required: &#34;)
print(str(solute) + &#34; g&#34;)
print(&#34; &#34;)
print(&#34;Note:  This program is a guide, and you should double check calculations&#34;)
</code></pre>

<pre><code>#Chemical solute calculator
print(&#34;Chemical solute calculator&#34;)
print(&#34; &#34;)
print(&#34;This program will ask you for some basic data and then calculate how much solute is needed for a given volume and concentration&#34;)
print(&#34; &#34;)
mass = input (&#34;Mass in g: &#34;) 
print(&#34;Solute requred&#34;)
volume = input(&#34;Volume in l: &#34;)
print((volume) + &#34; l&#34;)
conc = input (&#34;Required Concentration in M: &#34;) 


solute = float(mass) * float(volume) * float(conc)
print(solute)

</code></pre>

<p><strong>Note</strong>: This is just meant to work and perform a single function.  I have not added error checking, so values are numerical.</p>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Calculator" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Calculator</span></a>,<a href="/paulsutton/tag:Solute" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Solute</span></a>,<a href="/paulsutton/tag:Chemistry" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Chemistry</span></a>,<a href="/paulsutton/tag:Solution" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Solution</span></a>,<a href="/paulsutton/tag:Volume" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Volume</span></a>,<a href="/paulsutton/tag:Mols" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Mols</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/solute-calculator</guid>
      <pubDate>Sun, 17 Sep 2023 19:57:43 +0000</pubDate>
    </item>
    <item>
      <title>Molecular weight calculator</title>
      <link>https://personaljournal.ca/paulsutton/molecular-weight-calculator</link>
      <description>&lt;![CDATA[Molecular weight calculator&#xA;&#xA;I decided to write this to help calculate molar weights for chemistry.&#xA;&#xA;molweight&#xA;&#xA;In essence you can enter the Mass of an element or molecular mass of a substance, compound etc, and this will help give you  molar weight, for example 0.5 mol. &#xA;&#xA;It is, for example common to have different concentrations of an acid for example.  We know that Sodium Hydroxide has a weight of 40 because of the combined weight of its components:&#xA;&#xA;$NaOH$ which equates to&#xA;&#xA;Na = 22 +&#xA;O = 16 +&#xA;H = 1&#xA;= 39&#xA;&#xA;Therefore 1 mol of NaOH = 39g which is of course equal to Avogadros constant : $6.022 x 10^{23}$&#xA;&#xA;Therefore 0.5 mol is roughly $39 \div 2 = 19.5g$&#xA;&#xA;This program is NOT a substitute for proper calculation. You need to use more accurate values.  Values used are just a rough guide.&#xA;&#xA;However it may be useful, for those quick calculations. &#xA;&#xA;The program code base is taken from my Drake equation calculator I made a few weeks ago.&#xA;&#xA;#chemistry,#mol,#molar,#weight,#calculator&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Molecular weight calculator</p>

<p>I decided to write this to help calculate molar weights for chemistry.</p>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/molweight.png" alt="molweight"></p>

<p>In essence you can enter the Mass of an element or molecular mass of a substance, compound etc, and this will help give you  molar weight, for example 0.5 mol.</p>

<p>It is, for example common to have different concentrations of an acid for example.  We know that <a href="https://en.wikipedia.org/wiki/Sodium_hydroxide" rel="nofollow">Sodium Hydroxide</a> has a weight of 40 because of the combined weight of its components:</p>

<p>$NaOH$ which equates to</p>

<p>Na = 22 +
O = 16 +
H = 1
= 39</p>

<p>Therefore 1 mol of NaOH = 39g which is of course equal to <a href="https://en.wikipedia.org/wiki/Avogadro_constant" rel="nofollow">Avogadros constant</a> : $6.022 x 10^{23}$</p>

<p>Therefore 0.5 mol is roughly $39 \div 2 = 19.5g$</p>

<p>This program is <strong>NOT</strong> a substitute for proper calculation. You need to use more accurate values.  Values used are just a rough guide.</p>

<p>However it may be useful, for those quick calculations.</p>

<p>The program code base is taken from my Drake equation calculator I made a few weeks ago.</p>

<p><a href="/paulsutton/tag:chemistry" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">chemistry</span></a>,<a href="/paulsutton/tag:mol" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">mol</span></a>,<a href="/paulsutton/tag:molar" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">molar</span></a>,<a href="/paulsutton/tag:weight" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">weight</span></a>,<a href="/paulsutton/tag:calculator" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">calculator</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/molecular-weight-calculator</guid>
      <pubDate>Fri, 24 Jul 2020 06:30:00 +0000</pubDate>
    </item>
  </channel>
</rss>