# Prime Factorization Calculator — Factor Tree, GCF & LCM

> Find the prime factorization of one or two numbers with an interactive factor tree, the exponential form, and the greatest common factor (GCF) and least common multiple (LCM).

- **Category:** Math
- **Interactive calculator:** https://youcalc.com/en/math/prime-factorization/
- **Price:** Free, no sign-up required

## Overview

This calculator breaks any whole number into its prime building blocks, shows a visual factor tree, and — when you enter a second number — computes the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of the pair. Use it to simplify fractions, find common denominators, or explore the structure of numbers.

## How to read your result

The headline result shows the exponential prime factorization (for example 2³ × 3² × 5 for 360). Colored circles in the factor tree represent prime factors; open circles are the composite nodes being split. Below the tree, the GCF and LCM are listed only when you have entered a second number.

## Method

Factorization uses trial division: the number is repeatedly divided by 2, then by odd integers starting at 3, up to its square root. Each divisor found is a prime factor; its exponent counts how many times it divides the number. The GCF is then computed with the Euclidean algorithm (repeatedly replacing the larger value with the remainder of dividing by the smaller), and the LCM follows from GCF × (a / GCF) × b to avoid overflow for large inputs.

## Example

- **Setup:** Enter 360 as the first number and 48 as the second.
- **Result:** 360 = 2³ × 3² × 5 and 48 = 2⁴ × 3. Sharing three 2s and one 3 gives a GCF of 24. The LCM is 720 — the smallest number both divide into evenly.

## Frequently asked questions

### What is prime factorization?

Prime factorization is the process of writing a number as a product of prime numbers — numbers divisible only by 1 and themselves. The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one such representation (ignoring the order of factors).

### How are the GCF and LCM calculated from prime factors?

The GCF is found by multiplying each prime that appears in both factorizations, using the smaller exponent. The LCM uses each prime that appears in either factorization, using the larger exponent. For 360 = 2³ × 3² × 5 and 48 = 2⁴ × 3, the GCF is 2³ × 3 = 24 and the LCM is 2⁴ × 3² × 5 = 720.

### What does it mean if my number is flagged as prime?

A prime number cannot be broken down further — its only prime factor is itself. Primes have no factor tree; they are the atoms from which all other whole numbers are built.

## Related calculators

- [Fraction Calculator](https://youcalc.com/en/math/fraction-operations/)
- [Permutations & Combinations Calculator](https://youcalc.com/en/math/permutations-combinations/)
- [Percentage Calculator](https://youcalc.com/en/math/percentage/)

## Sources

- https://mathworld.wolfram.com/PrimeFactorization.html
- https://www.khanacademy.org/math/cc-fourth-grade-math/imp-factors-multiples-and-patterns/imp-prime-and-composite-numbers/a/prime-factorization-review

---

Interactive version: https://youcalc.com/en/math/prime-factorization/ · From YouCalc — https://youcalc.com
