Handy Orchard

Integer factor toolkit

Find prime factors, GCD and LCM for a bounded list of positive integers, with cancellable factorization and honest incomplete status.

Your input

One integer per line or separated by spaces/commas; 1–20 values, each from 1 to 1,000,000,000,000.

Outputs are cleared when the input changes.

Result

Enter your data or use the example, then run the tool.

Worked example

12 = 2² × 3 and 18 = 2 × 3²; their GCD is 6 and LCM is 36.

1 has an empty prime factorization and is not prime. Zero and negative inputs are rejected.

Method

Euclid’s remainder algorithm finds GCD; LCM uses a ÷ gcd(a,b) × b with exact BigInt arithmetic.

Bounded trial division removes prime factors. Work yields to the browser so cancellation can be processed; a budget stop leaves the unresolved remainder visible.

Limits

At most 20 positive integers, each ≤10¹². This is an educational tool, not a cryptographic factorization service.

Factorization may stop at a work/time limit. A partial result is never presented as a complete factorization or prime certificate.

Sources

William Stein: Elementary Number Theory, Chapter 1MDN: BigInt integer arithmetic

Related tools

Fraction arithmeticNumber base converterSignificant figure roundingBitwise operation lab

Your inputs stay on this device. Only optional, consented page visits are measured. Input values, files, filenames and processing logs are not sent to Analytics.

When switching languages, text, settings and selected files are temporarily kept on this device. Transfers are removed after restoring; interrupted transfers are cleaned up on a later visit. Inputs and files are never uploaded.