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.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
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.
<div data-a2z-widget="scientific-calculator" data-height="700"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
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
<a href="https://a2z.tools/embed/scientific-calculator">A2Z Tools Scientific Calculator</a>
[A2Z Tools Scientific Calculator](https://a2z.tools/embed/scientific-calculator)
Scientific Calculator by A2Z Tools - https://a2z.tools/embed/scientific-calculator
Related widgets
-
A clean on-screen calculator with keyboard support, correct operator precedence and percent.
-
Real or complex roots of ax^2 + bx + c = 0, with the discriminant, vertex and axis of symmetry.
-
Mean, median, mode, range, variance, standard deviation and quartiles of any list of numbers.
-
X% of Y, X as a percent of Y, and the percentage change between two values.
-
Add, subtract, multiply and divide fractions and mixed numbers, with the simplified answer.
-
Credit-weighted GPA for a term, plus the new cumulative GPA when you add prior results.