Mathover
Understand every step.
Start solving
← All tools
Basic Math

LCM and HCF

Enter two or more positive whole numbers separated by commas. The tool breaks each number into its prime factors and uses them to build both the highest common factor and the lowest common multiple.

InputsLCM · HCF

Step-by-step

waiting

Fill in the fields and press Solve. The full method will appear here, one numbered step at a time.

6 tools in Basic Math.Back to the tool directory →

Worked example

Find the LCM and HCF of 12, 18 and 30.

  1. 1.

    Break each number down into its prime factors.

    12 = 2^2 × 3
    18 = 2 × 3^2
    30 = 2 × 3 × 5
  2. 2.

    For the HCF, take each prime that appears in every number, using the lowest power it appears with, and multiply them.

    HCF = 2 × 3 = 6
  3. 3.

    For the LCM, take every prime that appears anywhere, using the highest power it appears with, and multiply them.

    LCM = 2^2 × 3^2 × 5 = 180

Answer: HCF = 6 · LCM = 180

Note: Needs two or more positive whole numbers.

Use “Load worked example” above to run this in the solver.

Related formulas

The formulas this tool uses, each explained with symbols, conditions and its own example in the Formula Library.