ToolHuts

Practical tools for measured work

Factor calculator

Find prime factors, positive divisors, greatest common divisor and exact least common multiple.

Calculate the layout, check the diagram, then print the result for the shop or jobsite.

Greatest common divisor6
Least common multiple36
Divisor count6

2^2 × 3^1

Positive divisors

Divisor
1
2
3
4
6
12

How it works

Factor the first integer into primes, enumerate its positive divisors, and compare both integers for GCD and LCM. For 12 and 18, GCD = 6 and LCM = 36. The divisors of 12 are 1, 2, 3, 4, 6 and 12.

Current-input example

The result above uses these exact values. This snapshot is included when the page is printed so the output can be checked against the original measurements.

Integer to factor
12
Second integer for GCD and LCM
18

Primary result: Greatest common divisor: 6.

Before using the result

  • Check the selected mode, units and input values before using the result.
  • Read the assumptions and rounding rules; compare the worked example with your intended calculation.
  • A numerical result does not supply missing context or change the stated limitations.

Limitations

Both inputs must be positive whole numbers no greater than one trillion. Zero and negative divisor conventions are excluded. LCM is returned as an exact integer even when it exceeds ordinary floating-point integer precision.

Frequently asked questions

Are the displayed decimals exact?

Fractions, combinations and integer multiples use exact integer arithmetic. Other results use floating-point arithmetic and are rounded for display. Keep the exact fraction when a repeating decimal matters.