+ - * / % ^ • Parentheses • Constants: pi, e • Functions: sqrt, abs, round, floor, ceil, min, max, sin, cos, tan, ln, log (trig uses radians).How to use
Enter one expression per line (optional Label: expression). Choose an output format and precision, then calculate.
- Type an expression like
(2+3)*4orsqrt(9)+min(10,3*2). - Optional: add labels, e.g.
Total: 19.99*1.07. - Select Plain or JSON, set decimals, then click Calculate.
- Click Copy output (or Copy for LLM) to paste into your prompt.
FAQ
What is this “calculator tool for LLM” used for?
It computes exact numeric results offline so you can paste verified values into an LLM prompt instead of relying on the model’s arithmetic.
Is this tool offline and safe?
Yes—no network calls, and it does not use eval. Expressions are tokenized, parsed, and evaluated locally in your browser.
What operators are supported?
+ - * / % ^ with parentheses. Exponentiation ^ is right-associative (e.g., 2^3^2).
Which functions and constants can I use?
Constants: pi, e. Functions: sqrt, abs, round, floor, ceil, min, max, sin, cos, tan, ln, log.
Can I calculate multiple lines at once?
Yes—one expression per line. You can also use Label: expression to name outputs.
How do I get JSON for my prompt?
Switch “Output format” to JSON, then click Calculate and Copy output.
Why do I see a “Line X” error?
That line has an invalid character, mismatched parentheses, an unknown function/identifier, or a missing argument (like a trailing comma).