JavaScript Calculator

This JavaScript application evaluates mathematical expressions numerically. It is ideal for simple calculations that would be too tedious with a hand calculator or slide rule. The source code is only a few lines.

No warranty. Use at your own risk. JavaScript numerics are not perfect, and neither am I.

Enter an expression here:

Result:

Special features

In addition to the standard methods and properties of the JavaScript Math object (summarized below), the following features are supported:

JavaScript Math object

Expressions are interpreted by JavaScript with the Math object. Expressions may include the following functions, which are methods of the JavaScript Math object. Note that the ^ operator does not perform exponentiation - use pow() instead.

In addition, the following constants are defined (as properties of the Math object):

If you'd like to learn more, there are helpful JavaScript tutorials at w3schools.com and praxent.com

A special shout-out to the Lyndhurst STEM club for girls!


Drop me a line if you have comments or questions:

kankel@physics.montana.edu

This page was last revised 2023 March 1.