Scientific Instrument Services, Inc.  Supplies and Services for Mass Spectrometers, Gas Chromatographs, and Liquid Chromatographs.
Contact Us view shopping cart
Search:
search by keywords or part number (e.g. "G75K")

The Exact Mass Calculator, Single Isotope Version

Type in Chemical Formula:


Results:
Mass (amu) =
Abundance (%) =

Overview

This is a very primitive exact mass calculator. Given the formula of a chemical species, the calculator determines the exact mass of a single isotope of that species and the relative abundance of that isotope. The isotope selected has the property that each atom in the species is the most abundant isotope of that element. For low mass chemical species, the chosen isotope is often the most abundant isotope of the species; however, this is often not the case for larger mass species due to the need for a more complex algorithm to make such a determination.

Instructions

This program requires that JavaScript be supported and enabled in your web browser. Type in the chemical formula. Click on the "Calculate Exact Mass" button. The results will be displayed.

How to input chemical formulas

Chemical formulas can be inputted according to a straightforward syntax. Include no spaces in input. Element names are case sensitive. Express formulas in terms of atoms (functional group abbreviations are not supported).

Examples:
CH3COOH is written as CH3COOH
H2SO4 is written as H2SO4
Mg(OH)2 is written as Mg(OH)2

Implementation Notes

This program is written entirely in JavaScript. You can invoke your browser's "View Source" feature to see the source code. Most of the core code is confined into a separate source file named "exactmass.js".

The architecture of the program can be understood in terms of compiler theory. The program first retrieves the chemical formula as a character string. This string is fed into a lexer, which converts the character string into a stream of tokens (e.g. atom names, numbers, and parenthesis). Invalid tokens (e.g. "Zy" or "%") produce an error. The parser sequentially reads tokens from the token stream. The parser is implemented as a state-machine, and the state of the parser changes as a function of the current parser state and the current token being read. By limiting the set of valid tokens at each state, the parser get make a distinction between syntactically valid (e.g. "Mg(OH)2") and syntactically invalid (e.g. ")MgO(H2") formulas. Note however that a syntactically valid formula ("CH6") is not necessarily semantically valid; this program makes no effort in determining semantic validity. During the parse phase, calculations are performed (i.e. generated). It is convenient that the parse and the generation phases can be closely coupled.

The mathematics is handled according to the following principle. An isotope of the form aAbB, where A and B are functional groups, themselves isotopes, has a mass of a + b and an fractional abundance equal to the product of the fractional abundances of the given functional group isotopes in their respective functional groups. The problem can be solved by recursion.

Other Tools

For a more advanced isotopic calculator, see the Isotope Distribution Calculator and Mass Spec Plotter.


(c) 1996-2002 Scientific Instrument Services, Inc.
Data is obtained from the CRC Handbook of Chemistry and Physics.
Disclaimer: Scientific Instrument Services is not responsible for any errors which may result from the use of this program.

back to top
Send comments on this page
Contacting our Customer Service Department--comments, questions, or anything can't find?
Call, e-mail, FAX, or type your comments below:
Contact details (optional, but required for us to reply or quote):
Name: Organization/Country:
Email: Phone/fax:
Regular business hours - 8:00 AM to 5:30 PM EST, M-F. E-mail replies normally expected within one business day.
PHONE: (908)788-5550;   FAX: (908)806-6631;   E-MAIL:
WEB: www.sisweb.com
ADDRESS: Scientific Instrument Services, 1027 Old York Rd., Ringoes, NJ 08551-1054.
© 1996-2012 Scientific Instrument Services, Inc. [ Terms | Trademarks | Privacy ]
SIS Newsletter
Covers SIS products, services, promotions, news, and other mass spectrometer related information.