Type one expression per line. Get exact fractions, mixed numbers and decimals with repeating digits marked, and no floating-point error.
An exact math calculator gives 0.1 + 0.2 as exactly 3/10 because it stores every number as a fraction of two whole numbers instead of a binary floating-point value. In JavaScript, 0.1 + 0.2 gives 0.30000000000000004, since 0.1 has no finite binary form. Here the decimal 0.1 is read as the fraction 1/10, and addition, subtraction, multiplication and division follow the rules of fractions on arbitrarily large whole numbers (BigInt), then reduce to lowest terms. Nothing is rounded. A result shows as a fraction, as a mixed number when it is larger than 1, and as a decimal. If the decimal repeats, the repeating digits go in brackets: 1/6 is 0.1(6) and 1/7 is 0.(142857).
With the sample lines: 0.1 + 0.2 is 3/10 = 0.3. 1/3 + 1/6 is 1/2. (7/3) * (9/14) is 3/2, written as the mixed number 1 1/2 and the decimal 1.5. 2^100 is 1267650600228229401496703205376, all 31 digits. 20! is 2432902008176640000. gcd(84, 36) is 12 and lcm(4, 6) is 12. 1/7 is 0.(142857). The comparison 0.1 + 0.2 == 0.3 is true, which a floating-point calculator reports as false. A fraction with a long period, such as 1/97 whose repeating part is 96 digits, is cut at the digit count you set (20 by default) and the result ends with three dots; it is cut, not rounded.
Use + - * / ^ and % with brackets. The signs × and ÷ are read as * and /. The symbol ^ is a power and so is **; the exponent must be a whole number, positive or negative, so 2^-3 is 1/8. A power binds tighter than a minus sign, so -2^2 is -4, and powers group from the right, so 2^3^2 is 2^9. The remainder a % b is a minus b times the floor of a divided by b, so the result takes the sign of b: -7 % 3 is 2 and 7.5 % 2 is 3/2. Postfix ! and factorial(n) give factorials. The functions are gcd, lcm (whole numbers, two or more), abs, floor, ceil, min and max. The comparisons == != < > <= >= return true or false. Numbers may use exponents, such as 1.5e3. 0^0 is 1. Lines starting with # are skipped.
Every size is capped so no line can freeze the page. You can enter up to 500 lines, 2,000 characters per line, and 100,000 characters in total. A result may have at most 5,000 digits in its numerator or denominator. Exponents run from -5,000 to 5,000, factorials up to 1,000, and an exponent inside a number such as 1e3000 is refused above 1000. Past a limit the line shows a fixed error, and the other lines still compute. This is not a symbolic or scientific calculator: there is no square root, no logarithm and no trigonometry, because their results are rarely fractions. Write 2^(1/2) and you get an error, not an approximation.
Language models often slip on long multiplication or on decimals, so checking a model's arithmetic with exact rules is useful. The page opens with prefilled text when the address ends in #input= followed by your URL-encoded lines, and the result for each line appears in the same order, so a script or an agent can read it back line by line. Turn off Show the expression before each result to get only the answers. Because the output is deterministic, the same expression always gives the same text.
Enter 0.1 + 0.2. The decimals are read as 1/10 and 2/10, the sum is 3/10, and the decimal view is 0.3. Entering 0.1 + 0.2 == 0.3 returns true, where JavaScript's floating-point arithmetic gives 0.30000000000000004 and false.
Type 2^100 to get 1267650600228229401496703205376, or 20! to get 2432902008176640000. Powers accept whole exponents from -5,000 to 5,000 and factorials go up to 1,000. A result over 5,000 digits shows an error instead of running.
Type 1/6. The decimal view is 0.1(6): the 6 repeats forever. 1/7 gives 0.(142857) and 1/3 gives 0.(3). If the repeating part is longer than the digit count you set, the decimal is cut and ends with three dots.
It gives a minus b times floor(a / b), so the result has the sign of b, as in Python. -7 % 3 is 2, 7 % -3 is -2 and 7.5 % 2 is 3/2. Dividing by zero shows a fixed error.
Exponents must be whole numbers from -5,000 to 5,000, factorials stop at 1,000 and results stop at 5,000 digits, so a line cannot freeze the page. Square roots and logarithms are not supported because they are rarely exact fractions.
No. The text is processed in your browser, in this tab, and not uploaded. Your choices on this page are saved in this browser; the text you paste is not.