Free online tools to generate, calculate,
convert, format, encode, and play.
 

Calc

A terminal-style calculator that works like a notebook. Type an expression and press Enter; reference previous results with _ or Out[n], recall commands with the arrow keys, define variables, and plot functions. Everything runs locally and your session is saved in your browser.


In [1]:
history Tab complete accept suggestion Ctrl+L clear type help for more share example clear copy session trig: rad

How It Works

Expressions

Standard math notation with + - * / % ^ (or **), parentheses, factorial !, and implicit multiplication: 2pi, 3(4+1), and 2x^2 all work. Numbers can be written as 1.5e-3, hex 0xff, or binary 0b1011. Large numbers may use digit separators, 1_000_000 or 1,000,000, and currency symbols $ £ € ¥ are ignored, so $1,000 + 10% works. Starting a line with an operator continues from the last result: +5 means _ + 5. Display an integer result in another base with hex(255), bin(10), or oct(8).

Percentages work the everyday way: 50% is 0.5, 15% of 80 is 12, and 120 + 10% adds 10 percent to give 132. With another operand, % is still the modulo operator: 10 % 3 is 1.

History References
_ or ansprevious result
__ and ___second and third most recent results
Out[n]result number n, e.g. Out[3] * 2

Click any previous input to load it back into the prompt; click any output to copy it. The arrow keys walk through your command history, and as you type, the most recent matching command is suggested inline; accept it with (at the end of the line) or Tab.

Variables

Assign with =, e.g. rate = 0.21 then 1500 * rate. Type vars to list what you have defined. Variables and history persist between visits; reset wipes everything.

Functions & Constants
sin cos tan asin acos atan atan2trigonometry; switch modes with deg / rad
sinh cosh tanh asinh acosh atanhhyperbolic
sqrt cbrt root(x,n) exp ln log log2 log10roots, exponentials, logarithms (log is base 10)
abs floor ceil round trunc sign mod hypotrounding and magnitude
min max gcd lcm ncr npr fact gamma randcombinatorics and utilities
sum mean median stdstatistics over a list, e.g. mean(3, 5, 8); std is the sample standard deviation
pi tau e phi infconstants
Plotting

plot(sin(x)) draws a graph inline; add a range with plot(x^2 - 3x, -5, 8). The expression is a function of x and can use your variables and history references.

Sharing

Click share below the terminal to copy a link that replays every calculation visible on screen, so variables and history references come out the same on the other end; use clear first if you only want to share what comes next. You can also craft a link by hand with ?q=, e.g. ?q=sqrt(2^10); separate multiple commands with a newline (%0A). The commands run in order when the page loads. Lines starting with # are comments; they are printed but not evaluated, which is handy for annotating a calculation before sharing it.

Commands

help quick reference; clear clear the screen (history is kept); reset erase history and variables; deg / rad set trig mode; vars list variables.

Privacy

Everything runs in JavaScript in your browser. Nothing you type is uploaded; the session is stored only in your browser's local storage.


Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste. The terminal fills whatever space you give it. Each visitor's session is stored in their own browser. Add &q=expression to pre-run a calculation on load.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with