How to use the number theory calculator
Choose a mode, fill in the fields that appear, and select Calculate. The Result panel shows the value and the Formula & steps list. Copy result puts the plain-text result on the clipboard, while Download result (.txt) saves it as a text file. Reset clears the fields and hides the result.
Choose a calculation mode
- Select Greatest common factor, Least common multiple, Prime factorization, Modular arithmetic, Factorial, or Permutations & combinations.
- Enter the values in the fields for that mode. The GCF and LCM fields accept integers separated by commas or spaces.
- In Modular arithmetic, choose an option in Operation. Enter
bwhen Modular exponentiation: a^b mod n is selected. - In Permutations & combinations, choose Without repetition or With repetition.
- Select Calculate, then review Result and Formula & steps. Use Copy result, Download result (.txt), or Reset.
GCF and LCM calculator inputs
Greatest common factor and Least common multiple each require at least two integers, with no more than 50 values in one list. The parser accepts a plus or minus sign, and GCF and LCM use absolute values. GCF accepts zero when at least one value is nonzero. LCM rejects any list containing zero.
Integers: 12, 18, 30
GCF = 6
GCF, LCM, and Modular arithmetic accept integers with up to 100 digits. GCF and LCM combine a list pairwise, and Formula & steps shows the intermediate values used.
Prime factorization and modular arithmetic
Prime factorization takes one Integer with up to 15 digits and uses trial division. For example, 360 is reported as 2^3 × 3^2 × 5. The tool rejects 0. The values 1 and -1 have no prime factors, while a negative input is factored by its absolute value and keeps its sign in the result.
Modular arithmetic has four Operation choices: a mod n (remainder), Additive inverse of a mod n, Multiplicative inverse of a mod n, and Modular exponentiation: a^b mod n. The modulus n cannot be zero. The b field appears for exponentiation and must be nonnegative. The multiplicative inverse exists when GCF(a, n) equals 1.
Factorial and permutations calculator options
Factorial accepts a nonnegative n from 0 through 10,000, with 0! = 1. Formula & steps shows the full multiplication chain through 15 terms. For larger inputs, it shows the result and digit count instead. Permutations & combinations accepts nonnegative n and r through 10,000, then returns both counts for the selected repetition setting.
n = 10, r = 3, Without repetition
Permutations = 720
Combinations = 120
With repetition, permutations use n^r and combinations use C(n + r - 1, r). Without repetition, r > n returns zero for both counts.
Three ways to use the modes
- For several integers, choose Greatest common factor and inspect the displayed Euclidean steps.
- For a remainder or inverse, choose Modular arithmetic and select the matching option in Operation.
- For ordered and unordered counts, enter the same
nandrin Permutations & combinations, then change the repetition setting.
Choose a narrower math calculator
Use Math Calculators for equations, fractions, sequences, geometry, matrices, vectors, or scientific calculations. Choose Greatest Common Factor Calculator for GCF steps, Least Common Multiple Calculator for LCM steps, or Prime Factorization Calculator for one number's factors.
Frequently asked questions
How do I calculate the GCF of several numbers?
Select Greatest common factor, enter at least two integers separated by commas or spaces, and select Calculate. The result combines the values pairwise and lists the Euclidean steps.
Can this number theory calculator find a modular inverse?
Select Modular arithmetic, then choose Multiplicative inverse of a mod n in Operation. The calculator returns an inverse when GCF(a, n) is 1. Otherwise, it reports that no inverse exists.
What happens when I enter zero or a negative number?
GCF accepts zero when another value is nonzero. LCM rejects zero, and Prime factorization rejects zero. Negative values work in the integer modes that accept signed input. Factorial and Permutations & combinations require nonnegative values.
How large can the calculator inputs be?
GCF, LCM, and Modular arithmetic accept integers up to 100 digits, with at most 50 values in a list. Prime factorization accepts 15 digits. Factorial and Permutations & combinations accept values through 10,000.