Result summary
Factor tree
For education only. The tool factors n into primes, then uses exponents to compute τ(n), σ(n), and φ(n). If m is given, it also computes gcd and lcm from min/max exponents. Trial division up to 6k ± 1 is practical for classroom-sized integers (≈10¹³).
How to use this calculator effectively
Use this page when you want a classroom-friendly prime factorization workflow: exact integer parsing with BigInt, every trial division step, a factor tree, and arithmetic functions derived from the prime exponents.
Start with the right input
Enter the integer n you want to factor. Add an optional integer m only when you also want to compare prime exponents and derive gcd(n, m) and lcm(n, m) from the two factorizations. Negative values are allowed; the tool separates -1 first and then factors the absolute value.
Read the outputs in order
Start from the canonical prime product, then scan the step log to see which divisors were tested and which ones divided cleanly. After that, use the exponent table to connect the factorization with τ(n), σ(n), φ(n), and, if m is present, gcd/lcm via min and max exponents.
How to use the factor tree
Each composite node splits by its smallest prime factor and the matching quotient until every leaf is prime. This makes the tree useful for board work, homework checks, and explaining why the canonical product and the step log agree.
Teacher-mode workflow
Turn on Teacher mode when you want to keep the step log visible while presenting. The shared URL preserves the teacher view, so you can send the same worked example to students or reopen it later without rebuilding the setup.
See also
FAQ
What integers can this tool factor?
Enter any integer with |n| ≥ 2. Very large values are supported, but the division steps may take longer to finish.
How is the factor tree drawn?
Each composite node splits by its smallest prime factor until every leaf is prime. The tree updates automatically after each calculation.
What do τ(n), σ(n), and φ(n) represent?
τ(n) is the number of positive divisors, σ(n) is their sum, and φ(n) counts integers from 1 to n that are coprime to n. This calculator derives all three from prime exponents.
Why can we get gcd and lcm from exponents?
If n and m are written as prime powers, gcd uses the minimum exponent for each prime and lcm uses the maximum. The exponent table visualizes this rule.
When should I turn on Teacher mode?
Use Teacher mode when you want the step log and supporting notes to stay open while presenting. It is especially useful for classroom projection, worksheet walk-throughs, or sharing a worked example URL that preserves the teaching view.