Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Factor Calculator (All Factors, Number of Factors, Prime Factorization)

Enter one positive integer to find its factors. The list of factors, the number of factors, the factor pairs and the prime factorization are all calculated at once.

Enter a positive integer with 1 to 14 digits (for example, 120). Factors cannot be found for 0, negative numbers or decimals.
Result
Enter a positive integer in the field on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter one positive integer, and all of its factors are listed from smallest to largest (none missed, none repeated)
  • You also get the factor pairs (pairs that multiply to the number) and the number of factors at the same time
  • The prime factorization (in a form like \(120 = 2 \times 2 \times 2 \times 3 \times 5\)) is shown too, with each division step
  • If the only factors are 1 and the number itself, it is a prime number, so you can also use this page to check whether a number is prime
  • A plain-language explanation of how to find factors and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page works with positive integers (1 or more, up to 14 digits). It does not handle factors of 0, negative numbers or decimals (factors here are only about positive integers dividing evenly into each other).

What is this calculation used for?

Simplifying fractions (the foundation for fraction skills)

To simplify \(\frac{24}{36}\), find a factor that the numerator 24 and the denominator 36 share, and divide both by it (divide by their greatest common factor, 12, and you get \(\frac{2}{3}\) in one step).
Once factors come to mind quickly, simplifying fractions, finding common denominators and simplifying ratios all become faster and more accurate. Many students who struggle with fractions are really struggling with this sense of factors.

Planning equal groups (everyday life and parties)

If you want to hand out 120 cookies so that everyone gets the same number with none left over, the possible numbers of people are exactly the factors of 120 (1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120).
Splitting a class into teams, filling goody bags, sharing supplies equally: listing the factors gives you every option for "how many people (or bags) can share this evenly".

Rectangular layouts for tiles, store displays and seating

The ways to arrange 36 tiles into a rectangle with none left over are exactly the factor pairs: 1×36, 2×18, 3×12, 4×9 and 6×6, five in all.
Laying out floor or wall tiles, arranging products on a shelf, setting up chairs for a ceremony: whenever a fixed number of items goes into a rectangle, the factor pairs are your layout options.

Encryption that protects online shopping and banking (RSA)

Prime factorization takes an instant for numbers of about 14 digits, but for huge numbers hundreds of digits long, it cannot be finished in any realistic time, even with all the computers in the world. RSA encryption, widely used on the internet, relies on this fact: "big numbers cannot be factored in practice".
When you send your card number to an online store, prime factorization, the same thing this page does, is at the root of what keeps your information safe.

Choosing gear tooth counts (machines, cars and watches)

If the tooth counts of two meshing gears share a factor, the same teeth keep meeting the same partners, so wear and damage tend to build up on certain teeth. That is why machine designers often choose tooth counts that share no factor other than 1 (that are relatively prime).
From car transmissions to wristwatches, whether two numbers share a factor affects how long a product lasts.

Formula

What a factor is (checking with multiplication)
Standard notation (the usual math form)
\(N\) \(=\) \(A\) \(\times\) \(B\)
In words (symbols replaced with words)
③ \(N\): number to factor \(=\) ① \(A\): factor \(\times\) ② \(B\): its partner factor
The formula in words
① When the \(A\): factor
② times the \(B\): its partner factor
③ equals exactly the \(N\): number to factor , both \(A\) and \(B\) are factors of \(N\)
Quick example
120 can be written as the product 4 × 30, so 4 and 30 are both factors of 120
number to factor (120) \(=\) factor (4) \(\times\) partner factor (30)
\(120 \div 4 = 30\)
\(4 \times 30 = 120\)
Key idea
To check whether a number is a factor, see whether it divides evenly. 120 ÷ 4 = 30 with no remainder, so 4 is a factor of 120 (and the answer, 30, is automatically a factor too). If there is a remainder, as in 120 ÷ 7 = 17 remainder 1, the number is not a factor. Factors always come in these "pairs that multiply to \(N\)", so the smaller factor of each pair is always at most \(\sqrt{N}\) (the number that gives \(N\) when squared). So if you try dividing by every number up to \(\sqrt{N}\), you find every factor. When both numbers in a pair are the same, as in 36 = 6 × 6 (a perfect square), 6 is counted only once. That is why a perfect square always has an odd number of factors.
Prime factorization (writing a number as a product of primes)
Standard notation (the usual math form)
\(N\) \(=\) \(p\) \(a\) \(\times\) \(q\) \(b\) \(\times\) \(r\) \(c\)
In words (symbols replaced with words)
⑤ \(N\): number to factor \(=\) ① \(p\): prime number ② \(a\): times \(p\) is multiplied \(\times\) ③ \(q\): another prime \(b\): times \(q\) is multiplied \(\times\) ④ \(r\): yet another prime \(c\): times \(r\) is multiplied
The formula in words
① Multiply the \(p\): prime number
② by itself the number of times given by \(a\): times \(p\) is multiplied
③ do the same with \(q\): another prime
④ and \(r\): yet another prime , each the right number of times, and multiply everything together
⑤ and you get back exactly the \(N\): number to factor
Quick example
The prime factorization of 120 (it divides evenly by 2 three times, by 3 once and by 5 once)
number to factor (120) \(=\) prime (2) times (3) \(\times\) another prime (3) times (1) \(\times\) yet another prime (5) times (1)
\(120 \div 2 = 60,\quad 60 \div 2 = 30,\quad 30 \div 2 = 15,\quad 15 \div 3 = 5\)
\(120 = 2 \times 2 \times 2 \times 3 \times 5 = 2^{3} \times 3 \times 5\)
Key idea
To find a prime factorization, just start with the smallest prime and keep dividing as long as it divides evenly. For 120: divide by 2 to get 60, by 2 again to get 30, and by 2 once more to get 15. 15 no longer divides by 2, so move to the next prime, 3, and get 5. 5 is prime, so you are done. A number may use just one prime or four or more different primes, but the result always has the same shape: a product of primes only. What is more, every number has exactly one prime factorization (apart from the order of the factors). This is called the uniqueness of prime factorization (the Fundamental Theorem of Arithmetic), one of the most important facts about integers.
Formula for the number of factors
Standard notation (the usual math form)
\(d(N)\) \(=\) \((a+1)\) \(\times\) \((b+1)\) \(\times\) \((c+1)\)
In words (symbols replaced with words)
④ \(d(N)\): number of factors \(=\) ① \(a + 1\): times \(p\) is multiplied, plus 1 \(\times\) ② \(b + 1\): times \(q\) is multiplied, plus 1 \(\times\) ③ \(c + 1\): times \(r\) is multiplied, plus 1
The formula in words
① Multiply \(a + 1\): times \(p\) is multiplied, plus 1
② by \(b + 1\): times \(q\) is multiplied, plus 1
③ and by \(c + 1\): times \(r\) is multiplied, plus 1 (one for each different prime)
④ and you get the \(d(N)\): number of factors
Quick example
Since \(120 = 2^{3} \times 3 \times 5\) (2 is multiplied 3 times, 3 once and 5 once), the number of factors of 120 is
number of factors \(d(120)\) \(=\) times for 2, plus 1 (3 + 1) \(\times\) times for 3, plus 1 (1 + 1) \(\times\) times for 5, plus 1 (1 + 1)
\((3+1) \times (1+1) \times (1+1) = 4 \times 2 \times 2 = 16\)
Key idea
Why does this formula give the count? Every factor of 120 can be made by multiplying "2 used 0 to 3 times, 3 used 0 or 1 time, and 5 used 0 or 1 time" (for example, 12 = 2 × 2 × 3 uses 2 twice, 3 once and 5 zero times). There are 4 choices for 2, 2 choices for 3 and 2 choices for 5, so there are 4 × 2 × 2 = 16 combinations. That is exactly the number of factors. The key is to add 1 to each count, because "use it 0 times" is also a choice. This formula comes up often in math contests and on standardized tests. You do not have to write out the factors one by one: once you have the prime factorization, you get the count right away.
The basic way to find factors is to look for pairs that multiply to the number, and dividing by every number up to √N finds them all. Once you have the prime factorization, multiplying "(times each prime is used + 1)" gives the number of factors in one step.

Symbols and terms

Symbols

\(N\) N The positive integer whose factors you want. (Example - 120)
\(A,\ B\) A, B A pair of factors that multiply to \(N\). (Example - the 4 and 30 in \(120 = 4 \times 30\))
\(p,\ q,\ r\) p, q, r The primes in a prime factorization (the prime factors). (Example - the 2, 3 and 5 in \(120 = 2^3 \times 3 \times 5\))
\(a,\ b,\ c\) a, b, c How many times each prime is multiplied in the prime factorization (the exponents). In the number-of-factors formula, you add 1 to each and multiply the results. (Example - for \(120 = 2^3 \times 3 \times 5\), 2 is multiplied \(a = 3\) times, and 3 and 5 are each multiplied \(b = c = 1\) time)
\(2^{3}\) 2 to the third power (2 cubed) 2 multiplied by itself 3 times (\(2 \times 2 \times 2 = 8\)). The small raised number (the exponent) tells how many times to multiply.
\(d(N)\) d of N The number of factors of \(N\). The d comes from "divisor", another word for factor. (Example - \(d(120) = 16\))
\(\sqrt{N}\) square root of N The number that gives \(N\) when squared (the square root). In every factor pair, one factor is at most \(\sqrt{N}\), so checking up to here is enough to find all the factors.

Terms

factor A positive integer that divides a given integer evenly (with no remainder). Example - the factors of 30 are 1, 2, 3, 5, 6, 10, 15 and 30, eight in all. 1 and the number itself are always factors of any number.
multiple A number you get by multiplying an integer by a whole number (1 times, 2 times, 3 times and so on). Factors and multiples are two sides of the same coin: "4 is a factor of 120" and "120 is a multiple of 4" say the same thing.
prime number An integer of 2 or more whose only factors are 1 and itself. In order they are 2, 3, 5, 7, 11, 13 and so on, without end. 1 is not a prime number.
composite number An integer of 2 or more that is not prime. It has 3 or more factors and can be broken down into a product of primes. (1 is neither prime nor composite.)
prime factor A prime number that divides a given integer evenly. Example - the prime factors of 120 are 2, 3 and 5, three in all.
prime factorization Writing an integer as a product of prime numbers only. Example - \(120 = 2 \times 2 \times 2 \times 3 \times 5\). There is only one way to do it (apart from the order of the factors).
divisor Another word for factor in this sense. In school math, "factor" is the usual word; in number theory, "divisor" is common, and the d in \(d(N)\) comes from it. This page uses "factor" throughout. (In a division such as \(120 \div 4\), the number you divide by is also called the divisor.)
perfect square A number you get by multiplying an integer by itself. Example - \(36 = 6 \times 6\) and \(3600 = 60 \times 60\). A perfect square always has an odd number of factors (because the pair of equal numbers is counted only once).
exponent (power) A way to write the same number multiplied by itself many times. In \(2^3\), the small raised number (the exponent) tells how many times to multiply.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.

Multiplication facts and division (Grades 3–4)
  • Knowing the multiplication facts up to 10 × 10 by heart
  • Being able to tell "divides evenly" from "leaves a remainder"
Factors and multiples (Grade 4)
  • Knowing what factors and multiples are, and being able to list the factors of small numbers (such as 12 or 18)
  • Knowing that "4 is a factor of 12" and "12 is a multiple of 4" describe the same relationship
Prime numbers and prime factorization (Grades 4–6)
  • Knowing what a prime number is (its only factors are 1 and itself), and being able to name the primes up to 10 (2, 3, 5, 7)
  • Knowing that dividing by the smallest primes in turn breaks any integer down into a product of primes
Exponents (Grade 6)
  • Knowing that the small raised number tells how many times to multiply, as in \(2^3 = 2 \times 2 \times 2\)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to check with division whether a number is a factor
Number to factor N 120
Number to test A 4
Remainder of N ÷ A (0 = it is a factor) =MOD(B1,B2)
Partner factor B (when the remainder is 0) =B1/B2
Table to check a prime factorization
Prime factor 1 2
Prime factor 2 2
Prime factor 3 2
Prime factor 4 3
Prime factor 5 5
Product of all (correct if it gives back the number) =PRODUCT(B1:B5)
Table to find the number of factors with the formula
Times prime p is multiplied, a 3
Times prime q is multiplied, b 1
Times prime r is multiplied, c 1
Number of factors d(N) =(B1+1)*(B2+1)*(B3+1)
The first table checks for a factor with MOD(B1,B2), "the remainder of B1 divided by B2". If B3 is 0, it is a factor, and B4 shows its partner (30 for 120 and 4). If the remainder is not 0, B4 is not a factor, so ignore it.
The second table checks a prime factorization. PRODUCT(B1:B5) multiplies everything from B1 to B5, so if B6 shows 120, the factorization is correct (for a number with fewer than 5 prime factors, enter 1 in the unused cells).
The third table is the number-of-factors formula. B4 shows (3+1)×(1+1)×(1+1) = 16.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to check with division whether a number is a factor
Number to factor N 120
Number to test A 4
Remainder of N ÷ A (0 = it is a factor) =MOD(B1,B2)
Partner factor B (when the remainder is 0) =B1/B2
Table to check a prime factorization
Prime factor 1 2
Prime factor 2 2
Prime factor 3 2
Prime factor 4 3
Prime factor 5 5
Product of all (correct if it gives back the number) =PRODUCT(B1:B5)
Table to find the number of factors with the formula
Times prime p is multiplied, a 3
Times prime q is multiplied, b 1
Times prime r is multiplied, c 1
Number of factors d(N) =(B1+1)*(B2+1)*(B3+1)
The same formulas as in Excel (MOD, PRODUCT) work as is. Copy the whole table, paste it into cell A1, and replace the numbers in column B with your own.

How to calculate it in Python

n = 120  # the positive integer to factor

divisors = []   # list of factors
pairs = []      # factor pairs that multiply to n
i = 1
while i * i <= n:            # dividing by numbers up to √n finds them all
    if n % i == 0:           # remainder 0: i is a factor
        divisors.append(i)
        if i != n // i:      # its partner is a factor too (skip the repeat in a square like 6×6)
            divisors.append(n // i)
        pairs.append((i, n // i))
    i += 1
divisors.sort()

prime_factors = []  # prime factorization (keep dividing by the smallest prime while it divides evenly)
rest = n
p = 2
while p * p <= rest:
    while rest % p == 0:
        prime_factors.append(p)
        rest = rest // p
    p += 1
if rest > 1:
    prime_factors.append(rest)  # whatever is left at the end is a prime factor too

print(f"Factors of {n} ({len(divisors)} in total): {divisors}")
print(f"Factor pairs: {pairs}")
if len(prime_factors) >= 2:
    print(f"Prime factorization: {n} = {' × '.join(map(str, prime_factors))}")
elif len(prime_factors) == 1:
    print(f"{n} is a prime number")
Runs with the standard library only. The code follows the idea of formula 1, "dividing by numbers up to √n finds every factor". Change n at the top and run it (numbers up to about 14 digits finish quickly).

How to write it in LaTeX and other math languages (copy and paste)

What a factor is (checking with multiplication)
N = A × B
N = A \times B
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>N</mi>
    <mo>=</mo>
    <mi>A</mi>
    <mo>&#xD7;</mo>
    <mi>B</mi>
  </mrow>
</math>
N = A xx B
A*B
N := A*B;
N = A*B;
N = A × B
Prime factorization (writing a number as a product of primes)
N = pᵃ × qᵇ × rᶜ × …
N = p^{a} \times q^{b} \times r^{c} \times \cdots
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>N</mi>
    <mo>=</mo>
    <msup><mi>p</mi><mi>a</mi></msup>
    <mo>&#xD7;</mo>
    <msup><mi>q</mi><mi>b</mi></msup>
    <mo>&#xD7;</mo>
    <msup><mi>r</mi><mi>c</mi></msup>
    <mo>&#xD7;</mo>
    <mo>&#x22EF;</mo>
  </mrow>
</math>
N = p^a xx q^b xx r^c xx cdots
p^a*q^b*r^c
N := p^a*q^b*r^c;
N = p^a*q^b*r^c;
N = p^a × q^b × r^c × …
Formula for the number of factors
d(N) = (a + 1)(b + 1)(c + 1) …
d(N) = (a+1)(b+1)(c+1)\cdots
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>d</mi><mo>(</mo><mi>N</mi><mo>)</mo>
    <mo>=</mo>
    <mo>(</mo><mi>a</mi><mo>+</mo><mn>1</mn><mo>)</mo>
    <mo>(</mo><mi>b</mi><mo>+</mo><mn>1</mn><mo>)</mo>
    <mo>(</mo><mi>c</mi><mo>+</mo><mn>1</mn><mo>)</mo>
    <mo>&#x22EF;</mo>
  </mrow>
</math>
d(N) = (a+1)(b+1)(c+1) cdots
(a + 1)*(b + 1)*(c + 1)
d := (a + 1)*(b + 1)*(c + 1);
d = (a + 1)*(b + 1)*(c + 1);
d(N) = (a+1)(b+1)(c+1)…

How to have ChatGPT  do the calculation

You are a calculation assistant for integers. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

For 120, find each of the following:
1. All factors, listed from smallest to largest, and how many there are
2. All factor pairs that multiply to 120
3. The prime factorization (in a form like 2 × 2 × 2 × 3 × 5)
4. A check with the number-of-factors formula (add 1 to how many times each prime is multiplied, and multiply the results) that it matches the count in item 1

Show the code you used and the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.