Scientific Calculator

Type a sum the way you would write it, or several lines. It understands brackets, powers, roots, logarithms, trigonometry, factorials, nCr and nPr, and lets later lines use ans and your own variables.

Free, no sign-up. Calculated in your browser, nothing is sent anywhere.

Expression

Each line up to 500 characters, up to 50 lines. A line like x = 5 stores a value; ans is the last result; a line starting with # is a note. Functions: sin cos tan sec csc cot asin acos atan sinh cosh tanh asinh acosh atanh sqrt cbrt ln log log2 exp abs sign trunc floor ceil round, and ncr(n,k) npr(n,k) min max gcd lcm atan2 with commas. Constants: pi, e. Also ^ for powers, ! for factorial and mod for remainder.

Angles are in

Type an expression, for example 2 * (3 + 4), or several lines.

How to

Use the calculator in three steps

  1. Type your expression

    Write it with ordinary symbols: + − × ÷ or * and /, brackets, and ^ for powers. Functions take brackets, as in sqrt(16). Put each calculation on its own line.

  2. Choose the angle unit

    This only affects trigonometry. sin(30) is 0.5 in degrees, about −0.988 in radians and about 0.454 in gradians.

  3. Reuse results

    The answers appear as you type, line by line. ans is the previous result, and a line such as rate = 5 lets later lines use rate. A line with a mistake shows its error and the rest still run.

Getting the answer you meant

  • Powers bind tighter than a minus sign: -2^2 is −4. Write (-2)^2 for 4.
  • You can leave out the multiplication sign next to brackets and names: 2(3+4) and 2pi work.
  • log is base 10 and ln is the natural logarithm. Use log2 for base 2.
  • Variable names are letters and digits and start with a letter. They cannot reuse a function name, pi, e, ans or mod.

FAQ

Scientific calculator questions

Which functions are supported?

sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, sqrt, cbrt, ln, log, log2, exp, abs, sign, trunc, floor, ceil and round. With commas: ncr, npr, min, max, gcd, lcm and atan2. Constants are pi and e. You can also use ^ for powers, ! for factorials and mod for remainders.

How do I switch between degrees, radians and gradians?

Use the Angles option under the box. It applies to the trig functions and to the results of asin, acos, atan and atan2. A full turn is 360 degrees, 2π radians or 400 gradians.

How do ans and variables work?

Each line is calculated in order. ans holds the last line that worked. Writing x = 5 stores 5 as x for the lines after it. Nothing is saved when you leave the page.

Why does −2^2 give −4?

The power is worked out before the minus sign, as in standard mathematical notation. Use brackets, (-2)^2, to square the negative number.

Is it safe to type anything into the box?

Yes. The calculator has its own small parser and never runs your text as code. Anything it does not recognise is reported as an error.

What are the limits?

Up to 50 lines of 500 characters, factorials up to 170, nCr and nPr with n up to 1000, and results that fit in a normal floating-point number. Larger results are reported as too large.