Molar Mass

 
element moles mol % wt %

Chemical Equation

# reagent M,
g·mol-1
mass, g
# product M,
g·mol-1
mass, g
×

About

What is it?

This is a very small app that allows you to calculate molar masses, balance chemical equations, and compute the product or reagent masses. It is written in vanilla JS and works offline in the browser (that is, in any more or less modern Firefox and Chrome-based browser). You can even download this page (i.e. Save it as... a complete webpage) and use it without Internet access. If you'd like to do this, though, please make sure to refresh the page before saving, because I've noticed that the browser sometimes does something weird when you save the page with the calculation results already in it.

How to use?

Well, this is pretty straightforward - type the formula or equation, and voilĂ ! The only thing that comes to my mind that isn't obvious is related to the separators in the equation input. The reagents or products must be separated with at least one whitespace or "+" character. This means that both "H2 + O2 = H2O" and "H2 O2=H2O" are valid, and the second one is obviously easier to type.

Reliability and atomic weight sources

I'd say that, as of now, the app is time-tested and should be quite reliable. In any case, if you don't believe me, you can easily check it out by testing it manually or inspecting the source code before using it in any crucial calculations.

The atomic weights and names of the elements which are used here were approved by IUPAC and CIAAW in 2021-2022 and are contained in the periodicTable variable in the chemCalc.js file. The weights were parsed from the tables grabbed directly from the references above. Based on how the atomic weight is defined therein, there are three categories of elements.

  • The first one contains the elements for which a value with the corresponding uncertainty is given: e.g., '58.933 194(3)' for Co. In such cases, I took the precise value: e.g., 58.933194 for Co.
  • For those elements the weight of which is given in a certain range, e.g., '[1.007 84, 1.008 11]' for H, a recommended 'abridged' value was taken (1.008 for H), because if the exact source of the element is unknown, this, and not the range midpoint, is believed to correspond better to the most probable average atomic weight of these atoms in your average sample. Only in cases of O and Tl, where due to rounding the abridged values lie slightly outside the recommended ranges, the midpoint was taken. For instance, for O, the midpoint of [15.999 03, 15.999 77], corresponding well to the atmospheric oxygen, is 15.9994, while the abridged value is 15.999 solely because of the limitation of 5 significant digits per an abridged value.
  • For the isotopes with no natural occurrence, I simply took the atomic mass of the stablest ones (see Table 2 in the UIPAC publication).

If you don't agree with my assertions regarding atomic weights or need some specific atomic weights (i.e. specific isotopes) or elements, feel free to download this app and modify the periodicTable to suit your needs. The recent recommendations on the Interpretation and use of standard atomic weights, as well as the information on the isotopic composition, may also be of use for you in that case.

A bit of history

Balancing chemical equations by hand is fun for educational purposes, but once you get the gist of how it's done, the tedium of it starts to get on your nerves.

The first automatic tool of this kind that we used in our department at the uni was something called "Ural Chemical Calculator" from the 90's. It worked, but its major drawbacks were the necessity of adding each substance to some database before using it in the equation, and the fact that it was not supported by anything more recent than Windows XP. Having to use a virtual machine for a quick calculation now and then is not fun.

The second one was written in LabView in 2016. We still use it now and then, but it is not quite cross-platform (never got to testing and building the installers for anything but Windows) and requires the LabView Runtime Engine to tag along.

The third one is this one. It was written in 2020 primarily for fun, but also to be small and accessible from almost anywhere on almost anything. I must say that before doing it I checked the first page in Google for existing famous equation balancers, and oh boy weren't they bloated, server-rendered, ad-ridden behemoths! So, in addition, this tiny app was intended to be the opposite of those web leviathans.