Mathematics

How to Use the NumUtility Scientific Calculator

Learn the exact NumUtility expression syntax for arithmetic, powers, roots, degree-based trigonometry, logarithms, absolute values, factorials, pi, and e. This guide explains the reasoning, not just the keystrokes.

Published · Updated · 6 min read

Enter one complete expression

NumUtility evaluates a typed expression rather than imitating the keys and memory modes of a handheld calculator. Enter ordinary decimal numbers and combine them with +, -, *, /, and ^. Use an asterisk for multiplication and a slash for division. Spaces are ignored. Select Calculate or press Enter in the expression field. The parser reads the complete string, applies its own precedence rules, and rejects any characters or unfinished structure it does not recognize.

Parentheses create explicit groups and may be nested. For example, (3 + 5) * 2^2 evaluates the sum before multiplication and returns 32. The parser does not support implicit multiplication: 2pi, 2(3+4), and 3sin(30) are invalid. Write 2*pi, 2*(3+4), and 3*sin(30). Commas, variables, assignments, percent signs, roots written as symbols, and calculator-specific key sequences are not part of the documented grammar.

Supported functions and constants

Functions must be written by name with parentheses: sqrt(x), sin(x), cos(x), tan(x), ln(x), log(x), and abs(x). Function names are case-insensitive because input is normalized to lowercase, but conventional lowercase is clearest. sqrt computes a real square root, abs returns distance from zero, log means base 10, and ln means base e. The parser does not provide inverse trigonometric, hyperbolic, floor, ceiling, combination, permutation, or arbitrary-base logarithm functions.

The constants pi and e are available by name and can participate in ordinary operations, such as 2*pi or e^2. A constant is not automatically multiplied by an adjacent number or parenthesis. Factorial uses a postfix exclamation mark, such as 5!, and is limited to whole numbers from 0 through 170. Only one postfix factorial is accepted, so 3!! is invalid. These details come from the current parser, not from assumptions about what other scientific calculators commonly offer.

Angles always use degrees

The trigonometric functions sin, cos, and tan interpret their argument as degrees. There is no degree/radian mode switch. Thus sin(30) is approximately 0.5. If a problem supplies radians, convert the angle to degrees before calling a trigonometric function: degrees = radians * 180/pi. Because the function itself uses degrees, entering sin(pi/6) asks for the sine of about 0.524 degrees, not the sine of π/6 radians.

Tangent is undefined where cosine is zero, including 90° plus integer multiples of 180°. The current floating-point implementation can return a very large finite number for tan(90) because the converted radian value is only approximately π/2. Treat that output as a numerical limitation, not a valid tangent. Avoid evaluating tangent at its mathematical singularities and check nearby-angle behavior when the denominator cosine is close to zero.

Domains and error messages

Real square roots require a nonnegative argument. sqrt(-1) is outside this calculator's real-number domain and produces the generic invalid-expression message. Real logarithms require a positive argument, so log(0), ln(0), and logarithms of negative values are rejected. Division by zero has its own explicit error. A factorial requires a nonnegative safe integer no greater than 170; negative values, ordinary decimals, and 171 or larger produce the factorial-range message.

An error does not mean the mathematical topic has no extension. Complex numbers can define roots and logarithms outside the real domain, and the Gamma function extends factorial-related ideas, but those systems are not implemented here. The calculator also rejects a result that becomes Infinity or NaN. It does not explain which nested subexpression caused every generic failure, so simplify a long expression into smaller valid pieces when diagnosing input.

Three verified calculations

Input: sqrt(144) + 2^3. Rule: evaluate the function and power before addition. Steps: sqrt(144)=12 and 2^3=8; then 12+8. Result: 20. Verification: 12²=144 and 8/2/2/2=1, confirming the two component values.

Input: 3 + 2*5^2. Rule: exponent before multiplication, multiplication before addition. Steps: 5²=25, 2*25=50, and 3+50=53. Result: 53. Verification: adding first would give 125, which does not follow the parser's precedence.

Input: sin(30) + log(1000) + 5!. Rule: functions and factorial are evaluated before addition. Steps: sin(30°) is approximately 0.5, log base 10 of 1000 is 3, and 5!=120. Result: approximately 123.5. Verification: 10³=1000 and 5×4×3×2×1=120.

Precedence and signs

Parenthesized expressions and function arguments are grouped first. Factorial is attached to a completed primary value, exponentiation is right-associative, unary signs apply around powers, multiplication and division run left to right, then addition and subtraction run left to right. Consequently 2^3^2 is 2^(3²)=512, -2^2 is -(2²)=-4, and (-2)^2 is 4. Use parentheses whenever a negative base is intended.

The order guide documents these parser-specific cases in depth. Do not rely only on a PEMDAS mnemonic, which does not settle chained powers or the relationship between unary minus and exponentiation. Explicit parentheses make an expression portable and easier to review. Function calls always require their own parentheses, while factorial follows a number, constant, parenthesized expression, or function result.

Floating-point display

Scientific functions are evaluated with JavaScript Number arithmetic, a double-precision binary floating-point format. Many decimal fractions, irrational constants, and trigonometric results cannot be represented exactly. For example, the internal result of sin(30) can be 0.49999999999999994 even though the mathematical value is exactly 1/2. The interface formats the final finite result to at most twelve significant digits, normally displaying 0.5.

A displayed result is therefore a numerical approximation unless the operation happens to be exactly representable. Do not infer more measurement precision than the input supplies. Reuse the original expression or adequate guard digits for later calculation rather than copying a heavily rounded display. The calculator is suitable for ordinary educational evaluation, but it is not an arbitrary-precision, symbolic-algebra, interval-arithmetic, or professional engineering validation system.

A dependable workflow

Translate the formula into the documented operators, add explicit multiplication, and parenthesize every intended group. Confirm degree inputs before using trigonometry and check function domains. Calculate, then compare the result with sign and magnitude expectations. If the expression fails, test smaller parts and rebuild it. Do not paste JavaScript, spreadsheet syntax, unit labels, or Unicode superscripts and expect them to be interpreted.

Use the focused companion guides for ambiguous precedence, degree/radian conversion, factorial boundaries, and logarithm bases. The calculator can evaluate their examples but cannot decide whether a formula models a real situation appropriately. It offers no financial, engineering, medical, or scientific certification. Preserve units outside the expression and apply domain knowledge before using a numerical result in a consequential decision.

What the result does not tell you

A successful evaluation confirms only that the expression matched the parser and produced a finite Number. It does not confirm that parentheses reproduce the source formula, that units are compatible, or that an empirical model applies. The same valid syntax can calculate a meaningless quantity if a conversion factor, sign, or domain assumption is wrong. Keep the original formula beside the entered expression and compare them term by term.

For repeatable work, record the exact input string, the displayed output, and any rounding rule. A screenshot of a result without its expression is insufficient evidence because small grouping changes can produce very different values. NumUtility stores no calculation history and offers no named variables or memory registers. Re-entering an expression later should therefore start from a saved formula rather than from memory of the displayed answer.

Frequently asked questions

Which operators does the NumUtility Scientific Calculator support?

It supports +, -, *, /, ^, parentheses, and a single postfix factorial operator !.

Does it support implicit multiplication?

No. Write 2*pi and 2*(3+4), not 2pi or 2(3+4).

Are trigonometric inputs degrees or radians?

They are always degrees. The interface has no mode switch.

Why can a result be slightly rounded?

Functions use double-precision binary floating-point arithmetic and the interface displays at most twelve significant digits.

Which functions are not supported?

Inverse trigonometric, hyperbolic, floor, ceiling, arbitrary-base logarithm, combination, permutation, symbolic, and complex-number functions are not implemented.

Sources

References used to support definitions and interpretation in this guide.

  1. OpenStax Contemporary Mathematics — Order of Operations
  2. MDN — JavaScript Math
  3. MDN — JavaScript Number