A scientific calculator with exact fractions and decimals, degrees or radians, 34 functions and a desk-calculator mode. Rounded answers are labelled as rounded.
Initializing in your browser…
Add, subtract, multiply, divide, compare and simplify fractions and mixed numbers, with step-by-step working and exact answers as fractions, mixed numbers and decimals.
Find the aspect ratio of any size in lowest terms, resize to a new width or height without distortion, and compare with common screen, film and photo ratios.
Exact age in years, months and days, the time between two dates, dates a number of days or months away, and countdowns, all counted on the calendar.
You want the exact chance of being dealt a royal flush in five-card poker: four winning hands out of every possible hand.
Expression
4 / nCr(52, 5)
Answer
= 0.000001539077 Exact as a fraction. The decimal is rounded to 12 places. As a fraction: 1/649740 read as (4 / nCr(52, 5))
nCr(52, 5) counts the ways to choose 5 cards from 52, which is 2,598,960. Dividing 4 by that number is done on fractions, so the calculator reduces it to 1/649740 rather than storing a rounded decimal, and only the display is rounded. That makes the odds easy to state: about 1 in 650,000, or 0.00015 percent.
A scientific calculator that keeps fractions and decimals exact, so 0.1 + 0.2 is 0.3 and 1/3 + 1/6 is exactly one half. Type an expression or use the keypad; the answer updates as you type, and anything that had to be rounded is labelled as rounded.
Exact where exact is possible. Whole numbers, decimals and fractions are held as fractions of whole numbers of any size, so addition, subtraction, multiplication, division, whole powers and roots that come out rational never pick up rounding error. 0.1 + 0.2 is exactly 0.3, a third stays a third through a long calculation, and 25! is printed with all 26 of its digits. Logarithms, trigonometry, irrational roots and the constants pi, e, tau and phi have no exact decimal form, so those answers are computed in standard double precision, shown to 15 significant figures, and marked Not exact with the reason. That is why sin(30) in degree mode reads 0.5 and not 0.49999999999999994.
Two ways to read 2 + 3 × 4. In algebraic mode, the default, multiplication and powers are worked out before addition, as in maths books, spreadsheets and programming languages, so the answer is 14. Chain mode copies a four-function desk calculator, where each operator is applied the moment you press the next one, so the same keys give 20. Chain mode shows the display after every key, which helps when you need to reproduce what a basic calculator or a till would show.
How an expression is grouped. Under every answer the tool prints the expression with the brackets it actually used, for example (2 ^ (3 ^ 2)). Powers group from the right, so 2^3^2 is 512, and a leading minus applies after the power, so -2^2 is -4. Implicit multiplication works (2pi, 3(4 + 5)) at the same level as an explicit ×, which means 1/2pi is half of pi. The full table of operators, with the cases where calculators and spreadsheets differ, is under How expressions are read.
Other forms of the answer. A fraction that is not whole is also shown in lowest terms and, when the cycle is short enough, as a repeating decimal such as 0.(142857). A whole number is converted to binary, octal and hexadecimal without losing digits, even past the point where ordinary floating point would. Press = or Enter to save an answer to the history and reuse it as Ans; Ans keeps the exact value, so 1/3 followed by Ans × 3 gives exactly 1.
Honest limits. Exponent notation such as 1e3 is not accepted because e is Euler's number here; write 1000 or 10^3. Factorials go up to 20000!, nCr and nPr up to n = 100,000, and a rounded answer beyond about 1.8 × 10^308, or one outside the real numbers, is refused with an explanation. Everything runs in your browser.
4 / nCr(52, 5) gives 0.000001539077, marked exact as a fraction, with 1/649740 shown alongside. There are four royal flushes among 2,598,960 five-card hands.
(1 + 0.05/12)^360 is 4.467744314006 to 12 places, computed from the exact fraction rather than from 360 rounded multiplications.
With Deg selected, sin(30) is 0.5 and asin(0.5) is 30. In Rad mode sin(30) is -0.988031624092862, the sine of 30 radians.
Check fraction arithmetic, order of operations and powers, and see the grouping that produced the answer.
Work out combinations, permutations and factorials exactly, then divide to get a probability as a fraction and a decimal.
Compound a rate exactly, for example (1 + 0.05/12)^360, without floating-point drift in the last digits.
Turn a large whole-number result into hexadecimal or binary, and check how a power or remainder groups before writing it in code.
Most software stores decimals in binary floating point, where 0.1 and 0.2 cannot be represented exactly and the tiny errors show up in the sum. This calculator stores them as fractions (1/10 and 2/10), adds them exactly and writes the result back as a decimal. The rounding only enters when an operation genuinely has no exact answer, such as a logarithm or a sine.
In standard mathematical notation multiplication is done before addition, so 3 × 4 is worked out first and the answer is 14. A simple four-function calculator works left to right as you press keys, adding 2 and 3 before it sees the ×, and shows 20. Chain mode reproduces that behaviour and shows the display after each key.
Powers are grouped from the right, so 2^3^2 means 2^(3^2), which is 2^9 = 512. That is the convention in mathematics and in most programming languages, though some spreadsheets group powers from the left. A leading minus sign is applied after the power, so -2^2 is -(2^2) = -4. Write (-2)^2 if you want 4.
It means the answer passed through an operation that has no exact decimal value, such as sin, ln, an irrational square root or the constant pi. The result is the nearest double-precision value, shown to 15 significant figures, which is accurate enough for practical work but is not the true infinite decimal.
In this calculator e is Euler's number, 2.71828..., so 1e3 cannot also mean one thousand without becoming ambiguous. Write 1000, or use powers of ten such as 1 * 10^3 or 6.022 * 10^23.
The remainder takes the sign of the number being divided, so -7 mod 3 is -1. This matches C, Java and JavaScript. Python and some spreadsheets return 2 instead, because they round the quotient down rather than toward zero.
Whole numbers and fractions have no fixed size limit, so 2^1000 or 100! is printed in full. Factorials are limited to 20000! and nCr and nPr to n = 100,000 so the page stays responsive. Answers that have to go through floating point are limited to about 1.8 × 10^308.
No. Ans stores the exact value of the last saved answer, so a fraction stays a fraction. Calculating 1/3, pressing =, then Ans × 3 gives exactly 1.
Every calculation runs locally in your browser. Your numbers and expressions are not transmitted or stored.