CODDY Tool

Math Calculator

Roots, exponents, factorials, GCD, LCM, primes and factorisation.

The mathematical operations that come up in homework and in code: roots and powers, factorials, greatest common divisor and lowest common multiple, prime checking and prime factorisation.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

Loading tool…

What Math Calculator supports

Powers

  • Square & cube roots
  • Exponents
  • Factorial

Number theory

  • Greatest common divisor
  • Lowest common multiple
  • Prime checker
  • Prime factorisation

About Math Calculator

These are the operations that appear in coursework and in code, and that a basic calculator either lacks or hides. Prime factorisation, greatest common divisor and lowest common multiple all come up whenever fractions or ratios need simplifying.

Where a result stops being exact, the tool says so. Factorials grow faster than almost anything else: 21! already exceeds the largest integer JavaScript can represent precisely, and beyond 170! the result exceeds the largest number it can hold at all. Reporting an approximation as though it were exact would be worse than useless.

How to use the maths calculator

  1. Choose an operation

    Roots, exponents, factorial, GCD, LCM, prime checking or factorisation.

  2. Enter your numbers

    Results appear as you type.

  3. Read the working

    Factorisation shows the full list of prime factors, and GCD and LCM show how they relate.

What these are actually for

  • GCD simplifies fractions: divide the numerator and denominator by their greatest common divisor.
  • LCM finds a common denominator when adding fractions, and a repeat interval for two cycles.
  • Prime factorisation underlies both, and is the basis of RSA encryption — which relies on factorising very large numbers being impractical.
  • Factorials count permutations: 5! = 120 is the number of ways to order five items.

Frequently asked questions

What is a prime number?

A whole number greater than 1 whose only divisors are 1 and itself. 2 is the only even prime, and 1 is deliberately not prime — treating it as prime would break the rule that every number has exactly one prime factorisation.

Why does a large factorial say it is approximate?

Factorials outgrow exact representation quickly. Beyond 20! the result exceeds the largest integer JavaScript can hold precisely, and beyond 170! it exceeds the largest number it can hold at all. The tool marks results that are no longer exact rather than presenting an approximation as fact.

What is the difference between GCD and LCM?

The greatest common divisor is the largest number that divides both — used to simplify fractions. The lowest common multiple is the smallest number both divide into — used to find a common denominator. They are related: GCD × LCM equals the product of the two numbers.

How large a number can I factorise?

Trial division handles any number a browser input reasonably accepts, and is effectively instant below about 10¹². Numbers with two very large prime factors are the slow case — which is precisely why RSA encryption is built on that difficulty.

Math Calculator is free to use with no account, no watermark and no usage limits. Last updated 14 August 2026.