Scientific Calculator Widget

Add a scientific calculator to your course, tutorial or exam-prep page. Students type an expression such as 2sin(30) + sqrt(16) or use the keypad, switch between degrees and radians, and reuse the previous answer with Ans.

Education & Math Calculator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/scientific-calculator" title="Scientific Calculator by A2Z Tools" width="100%" height="700" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

The expression is split into tokens and evaluated by a recursive-descent parser written for this widget, so there is no eval. Powers are right-associative and bind tighter than a leading minus, exactly as on paper: -2^2 = -4 and 2^3^2 = 512. Implicit multiplication such as 2pi or 3(4 + 1) is supported. In degree mode, sine, cosine and tangent are exact at multiples of 90 degrees, so sin(180) is 0 and tan(90) is reported as undefined. Results show 12 significant digits, which keeps 0.1 + 0.2 at 0.3.

Calculation method

  • Precedence: brackets, functions and !, then ^ (right to left), then unary minus, then x and /, then + and -
  • Degrees: sin(x) = sin(x x pi / 180); inverse functions return degrees
  • log = base-10 logarithm, ln = natural logarithm (base e)
  • n! for whole numbers 0 to 170 (171! exceeds double precision)
  • Display: 12 significant digits; exponent form outside 1e-9 to 1e15

Limitations

  • No complex numbers, matrices, unit conversions or symbolic algebra; sqrt(-1) is refused as not a real number.
  • Hyperbolic functions, nCr/nPr and gradians are not available.
  • Double precision limits results to about 15-16 significant digits; the display rounds to 12.

Where publishers use it

  • Physics, chemistry and engineering course pages where students check worked examples
  • Trigonometry tutorials that need a degree/radian toggle next to the explanation
  • Online tuition and exam-prep sites for students without a handheld calculator
  • Lab manuals and internal wikis for quick unit-free calculations

Questions

Why is -2^2 equal to -4?

Standard mathematical convention applies the power before the leading minus, so -2^2 means -(2^2). Type (-2)^2 to square negative two.

Does it work in degrees or radians?

Both. Degrees is the default; switch with the toggle. Publishers can preset radians with v_angle=rad.

What does Ans do?

Ans holds the last result you confirmed with = or Enter, so you can chain calculations such as Ans x 2.

Why is 171! refused?

171! is larger than the biggest number a standard double-precision value can hold (about 1.8 x 10^308), so any result would be wrong. 170! is the largest factorial it shows.

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Scientific Calculator
https://a2z.tools/embed/scientific-calculator

Preview