DevTools Logo

Scientific & Engineering Calculator

Scientific & Engineering Calculator

Six-mode math workstation: precision arithmetic, reactive notebook, function plotting, linear algebra, statistics and engineering units — all client-side.

Precision
Scientific
sin⁡(45)+16\sin\left(45\right)+\sqrt{16}
4.70710678118654.7071067811865

Memory & variables

Store results: A = 42 works directly in the expression — try it, then press =.

Export as code

LaTeX
\sin\left(45\right)+\sqrt{16}
Python / NumPy
math.sin(45) + math.sqrt(16)
JavaScript
Math.sin(45) + Math.sqrt(16)
C++
std::sin(45) + std::sqrt(16)

Examples

Exact decimal arithmetic

Input
0.1 + 0.2   (precision: 32 digits)
Output
0.3

BigNumber mode eliminates the classic IEEE 754 artifact 0.30000000000000004.

Angle-aware trigonometry

Input
asin(0.5)   (mode: Deg)
Output
30

Inverse trig reports degrees in Deg mode; sin/cos/tan arguments are converted the same way.

Reactive notebook

Input
radius = 12.5
area = pi * radius^2
volume = area * 30
Output
area = 490.8738521234…
volume = 14726.2155637022…

Edit radius and every dependent line recomputes instantly.

Dimensional analysis

Input
10 N * 5 m
Output
50 J

Units multiply and cancel inside expressions; `to` converts (3.5 bar to psi → 50.76…).

Quadratic formula as code

Input
(-b + sqrt(b^2 - 4*a*c)) / (2*a)
Output
LaTeX: \frac{-b+\sqrt{b^{2}-4ac}}{2a}
Python: (-b + math.sqrt(b**2 - (4*a)*c)) / (2*a)

One expression, four export formats, each one click away.

About this tool

The Scientific & Engineering Calculator is a six-mode math workstation that runs entirely in your browser: a standard scientific keypad with live LaTeX preview, a reactive multi-line notebook, an interactive 2D function plotter with numeric analysis, matrix & linear algebra, statistics with probability distributions, and an engineering units mode with the CODATA 2022 physical constants.

Precision is the headline feature: switch from 64-bit floats to 16–64 significant digits and arithmetic moves onto arbitrary-precision decimals, so 0.1 + 0.2 is exactly 0.3 and 100! keeps all 158 digits. A fraction display mode reconstructs rational forms, and complex results (sqrt(-4) → 2i) are opt-in so they never ambush an engineering calculation.

Everything is client-side and eval-free: expressions are parsed into an AST and evaluated by the mathjs engine with decimal.js for big-number mode, KaTeX renders formulas, and results — history, variables and settings included — never leave your browser.

How to use this tool

  1. Type or tap an expression

    Enter math freely from the keyboard (sin(pi/4) + sqrt(16)) or use the keypad — the 2nd key reveals inverse and hyperbolic variants.

  2. Pick angle and precision

    Choose Deg/Rad/Grad and float or 16–64-digit precision from the settings bar; results update instantly.

  3. Evaluate and reuse

    Press = or Enter. The result becomes ans, the calculation lands in history, and A = … stores variables you can reference later.

  4. Explore the modes

    Switch with the tabs or Alt+1…6: reactive notebook, function graphing with numeric analysis, matrix algebra, statistics and unit conversions.

  5. Export as code

    Copy the live LaTeX, Python, JavaScript or C++ rendering of your expression from the export panel.

Use cases

Game & graphics programming

Vector/matrix products, complex numbers and radian trig for rotation matrices — then copy the formula straight into C++ or JavaScript.

Electronics & DSP engineering

Filter corner frequencies (1/(2 pi R C)), dB arithmetic and SI conversions (3.3 V, 50 mA) with CODATA constants one click away.

Data analysis & stats class

Paste a data set for mean/median/IQR/standard deviation, run linear regression on (x, y) pairs, or check binomial and Poisson probabilities.

Homework & research

Graph f(x), read off roots and extrema, compute the definite integral, and export the whole setup as LaTeX for the write-up.

Common mistakes

Mistake:Typing sin(30) in Rad mode and getting −0.988

Fix:Check the angle indicator in the settings bar — Deg/Rad/Grad changes the meaning of every plain trig argument. Alt+D flips it.

Mistake:Expecting 0.1 + 0.2 = 0.3 in float mode

Fix:Float mode is intentionally 64-bit; switch Precision to 16–64 digits for exact decimal arithmetic.

Mistake:Using h for the Planck constant in unit expressions

Fix:Bare h is the hour unit (km/h). The Planck constant is hplanck — or just click Insert in the constants panel.

Mistake:Dividing units that don't cancel

Fix:Dimensional analysis is strict: `10 N * 5 m` → 50 J works, but adding N to m errors with a dimensions-do-not-match message.

Mistake:Losing the last result

Fix:ans (or the Ans keypad key) recalls it, the history drawer (Alt+H) stores the last 200 calculations, and MS/MR give you a classic memory register.

Frequently asked questions

How is 0.1 + 0.2 exactly 0.3 here?

Switch Precision to 16–64 digits and arithmetic runs on arbitrary-precision decimals (decimal.js) instead of 64-bit floats, so classic IEEE 754 artifacts like 0.30000000000000004 disappear. Float mode shows the standard JS result for comparison.

What is the difference between Deg, Rad and Grad?

It is the unit plain trig arguments are interpreted in: sin(30) means 30 degrees in Deg, π/6 radians in Rad, or ⅓ of a right angle in Grad. Results of inverse trig follow the same mode — asin(0.5) is 30 in Deg, 0.5236 in Rad. Alt+D toggles Deg ↔ Rad.

Does the graph mode find roots and integrals?

Yes. With a function enabled, the analysis panel lists zero crossings (bisection-refined), local minima/maxima (derivative sign changes), the tangent line and slope at any x, and the definite integral over your bounds via both Simpson's and the trapezoidal rule for a sanity cross-check.

Can I use variables and multi-line calculations?

The Notebook tab is a reactive sheet: radius = 12.5 on one line, area = pi * radius^2 below it, and editing the first line instantly recomputes everything that depends on it. You can define functions (f(x) = 2*x^2 + 5*x - 3), reference earlier results with $3 or ans, and write // comments.

How do I export a formula to code?

Type the expression in the Scientific tab and the export panel shows it live as LaTeX, Python (math.*), JavaScript (Math.*) and C++ (std::*) — each with a one-click copy. The LaTeX is also copyable with Ctrl/Cmd+Shift+C.

Which matrix operations are supported?

Addition, subtraction and multiplication of two matrices (2×2 up to 6×6), scalar multiple, integer powers, transpose, determinant, trace, rank, inverse (with singularity detection) and the adjugate. Results export as a bmatrix LaTeX block or CSV.

Where do the physical constants come from?

CODATA 2022 recommended values — the speed of light c, Planck constant, Boltzmann constant, Avogadro number and more, each with its unit. Insert one with a click, or type its symbol (hplanck, kB, NA…) directly in a unit expression.

Is my data sent anywhere?

No. Every calculation, graph sample and matrix runs in your browser; history and variables persist only in your own localStorage. There are no server calls and no analytics on expression contents.

Why does sqrt(-4) show an error?

Complex results are off by default so engineers don't get surprised by imaginary numbers mid-calculation. Flip the Complex 𝒊 toggle in the settings bar and sqrt(-4) returns 2i.

What keyboard shortcuts work?

Alt+1…6 switches modes, Alt+D toggles Deg/Rad, Alt+H opens history, Enter evaluates, Escape clears (AC), Ctrl/Cmd+Z / Y undo and redo the input, Ctrl/Cmd+C copies the result and Ctrl/Cmd+Shift+C copies the LaTeX.

References & standards

.env Secret Safety Linter

Validate .env syntax and spot likely leaked credentials or placeholder secrets.

.htaccess Generator

Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth

2D Fluid Dynamics & Particle Physics Sandbox

A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.

AI Function Calling Schema Generator

Generate function calling JSON schemas from TypeScript interfaces

Algorithm Arena & Data Structure Visualizer

Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.

Ansible Playbook Generator

Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML