2026-09-29 8 min

Number Theory Calculator

Explore any integer: primality test, divisor count and sum, Euler totient, and prime factorization with steps.

Calculator

Number Theory Inputs

Integer (n) Help

Integer from 2 to 10,000,000

Results update live as you type
Status:60 is composite2^2 × 3 × 5

Number Theory Summary for 60

ClassificationComposite
τ(n) — divisor count12
σ(n) — divisor sum168
φ(n) — totient16
Factorization2^2 × 3 × 5

All divisors (12)

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60

Results

Normal

Primality

Composite

2^2 × 3 × 5

Divisor Count τ(n)

12

Positive divisors of n

Divisor Sum σ(n)

168

Sum of all divisors

Totient φ(n)

16

Residues coprime to n

Smallest Prime Factor

2

First divisor found

Distinct Primes

3

Unique primes in n

Trial division and divisor enumeration are exact for integers 2–10,000,000; τ, σ, and φ all derive from one verified factorization.

Visualizations

Profile of n

12τ(n)
16φ(n)
3distinct

Totient share

Coprime27%
Shared factor73%

Coprime density

φ(n)/n27%

Divisor sum vs n

σ(n)168

Formula

Factorize once, then read everything off the exponents: choices multiply for the count, geometric series multiply for the sum, and distinct primes shrink n for the totient.

τ(n) = Π(e+1), σ(n) = Π(p^(e+1)−1)/(p−1), φ(n) = n·Π(1−1/p)

Alternative Form

n prime ⟺ no divisor d with 2 ≤ d ≤ √n

Variables

SymbolNameUnitDescription
nInput integerinteger2 to 10,000,000
τ(n)Divisor countcountNumber of positive divisors
σ(n)Divisor sumintegerSum of all positive divisors
φ(n)Euler totientcountResidues 1..n coprime to n

Explanation

The exponent pattern of n is its fingerprint: τ counts exponent choices, σ weights them geometrically, φ deletes the residue classes sharing a prime.

Derivation

Write n = Π p^e. Divisors pick exponents 0..e independently (τ). Summing p^0+…+p^e per prime and multiplying gives σ. Keeping the (p−1)/p fraction of residues coprime to each p gives φ.

Step-by-Step Calculation

Follow each step to understand how the result is calculated from your inputs.

Step 1

Validate the input and set the trial-division bound.

Test divisors d ≤ √n
n:60
√n bound:7
Result: n = 60, testing to 7
Step 2

Run trial division (2, 3, then 6k±1) to decide primality.

Prime ⟺ no divisor ≤ √n
verdict:Composite
Intermediate: First hit: smallest factor 2
Result: 60 is composite
Step 3

Factorize completely by dividing out each prime.

n = Π p^e
Factorization:2^2 × 3 × 5
Result: 60 = 2^2 × 3 × 5
Step 4

Count divisors from the exponents.

τ(n) = Π (e+1)
2:2+1
3:1+1
5:1+1
Intermediate: 3 × 2 × 2
Result: τ(60) = 12
Step 5

Sum divisors with the geometric-series product.

σ(n) = Π (p^(e+1)−1)/(p−1)
terms:3
Intermediate: σ = 168
Result: σ(60) = 168
Step 6

Apply the totient product over distinct primes.

φ(n) = n × Π (1 − 1/p)
primes:2, 3, 5
Intermediate: 60 × (1−1/2) × (1−1/3) × (1−1/5)
Result: φ(60) = 16
Final Answer
Composite

Worked Examples

See how the calculator works with different scenarios.

Scenario

Highly composite default.

Inputs

n:60

Calculation

60 = 2² × 3 × 5 τ = 3×2×2 = 12, σ = 168, φ = 16

Result

Composite · τ=12 · σ=168 · φ=16

Interpretation

Twelve divisors sum to 168; sixteen residues below 60 are coprime to it.

Understanding Your Result

Your Result: Primality, τ(n), σ(n), and φ(n) for your input — see the result cards.

Typical range: τ(n) grows slowly (usually under 100 below the cap); φ(n)/n ranges from near 0 to (n−1)/n for primes.

What This Means

The verdict says whether n splits; τ and σ describe its divisor landscape; φ counts the residues that share nothing with n.

Why It Matters

These five signatures feed fractions (GCD), scheduling (LCM), ciphers (φ), and every divisibility question downstream.

Professional Interpretation

τ = 2 flags a prime; σ = 2n flags a perfect number; φ = n−1 independently confirms primality.

Recommendations

  • •Multiply the factorization to verify n
  • •Read τ = 2 as prime
  • •Compare σ against 2n for abundance
  • •Use φ for fraction and cipher work
  • •Try neighbors to spot prime gaps

Educational Content

Introduction

Number theory studies the integers themselves: who divides whom, how divisors accumulate, and which residues stay coprime.

Concept Explanation

One factorization unlocks four functions — trial division for the verdict, exponent arithmetic for τ and σ, and the prime-deletion product for φ.

Applications

▸Fraction reduction and GCD/LCM setup
▸Calendar, gear, and scheduling cycles
▸RSA key math via the totient
▸Perfect and abundant number hunts
▸Mental-math divisibility training
▸Contest divisor problems

Benefits

  • •Five signatures from one input
  • •Exact trial-division verdict
  • •Exponent-level transparency
  • •Divisor strip visualization
  • •Totient density gauge

Limitations

  • •Caps at 10,000,000
  • •Trial division slows near the cap
  • •Single integer per run

Best Practices

  • •Verify the factorization product
  • •Quote τ with the divisor list
  • •Use φ/n as the coprime density
  • •Check σ = 2n for perfect numbers
  • •Compare neighbors for patterns

Common Misconceptions

Myth: More divisors means a bigger number.
Truth: 60 (τ=12) out-divides 97 though it is smaller — structure beats size.
Myth: φ(n) is always close to n.
Truth: Highly composite n can push φ(n)/n below 20%; only primes approach (n−1)/n.
Myth: 1 is prime.
Truth: 1 has a single divisor and its own category — neither prime nor composite.
Myth: Trial division is obsolete.
Truth: Up to √n it is exact and instant at learning scales; advanced tests only matter far beyond the cap.

Practical Tips

  • •Multiply out the factorization to verify n
  • •Read τ = 2 as an instant prime flag
  • •Compare σ with 2n for perfect/abundant/deficient
  • •Use φ = n−1 as a primality cross-check
  • •Scan the divisor strip for symmetry pairs
  • •Try n±1 to explore prime gaps
  • •Keep inputs below 10,000,000

Common Mistakes

Counting 1 as prime
1 is neither prime nor composite; divisor tools start at 2.
Confusing τ(n) with σ(n)
τ counts divisors, σ sums them — 60 has τ = 12 but σ = 168.
Assuming φ(n) = n − 1 always
That holds only for primes; composites lose residue classes to shared factors.
Forgetting divisor pairs
Divisors pair as d × (n/d); the strip shows the symmetry around √n.
Entering values above the cap
Enumeration scans toward √n, so inputs stop at 10,000,000 for responsiveness.

Assumptions

This calculator makes the following assumptions to provide estimates:

Positive integers: Inputs are integers n with 2 ≤ n ≤ 10,000,000.
Trial division: Primality tests 2, 3, then 6k±1 candidates to √n.
Exact arithmetic: All counts and sums are exact integers below 2^53.
Unique factorization: Every n has one prime-exponent fingerprint.
Local compute: Everything runs in the browser; nothing is uploaded.

Limitations

Be aware of these limitations when using this calculator:

10M cap: Larger inputs are rejected to keep trial division interactive.
Slow near-cap primes: Prime inputs near 10^7 test thousands of divisors.
No crypto scale: Hundreds-digit inputs need sieve and probabilistic methods.
Single integer: One n per run; sets belong in the GCD/LCM tool.

Frequently Asked Questions

Answers to common questions about this calculator.

What does this number theory hub compute?
For one integer n it reports primality, the divisor count τ(n), the divisor sum σ(n), Euler totient φ(n), and the prime factorization — the five facts every deeper tool builds on.
What are τ(n) and σ(n)?
τ(n) counts the positive divisors and σ(n) adds them. For 60: τ = 12 divisors and σ = 168. Both come straight from the prime exponents.
What is φ(n)?
Euler totient φ(n) counts integers 1..n coprime to n. For 60 = 2²×3×5: φ = 60×(1/2)×(2/3)×(4/5) = 16.
How is primality tested here?
Trial division by 2, 3, then 6k±1 candidates up to √n. Exact for every n up to the 10,000,000 cap.
Why is n capped at 10,000,000?
Divisor enumeration and trial division scan toward √n, which passes 3,000 rows near the cap — fast enough to stay interactive, slow enough to need a ceiling.
What does the factorization string mean?
The unique prime product of n with exponents for repeats: 60 = 2² × 3 × 5. Multiply it out to verify n.
How do exponents give the divisor count?
Each prime p^e offers e+1 exponent choices (0..e); multiply the choices: 2²×3×5 gives (2+1)(1+1)(1+1) = 12 divisors.
Can a prime be detected from φ(n)?
Yes: n is prime exactly when φ(n) = n−1. Composites always lose at least one residue class to a shared factor.
Is 1 a valid input?
No — 1 is neither prime nor composite and its divisor formulas are degenerate, so the hub starts at 2.
Where do I go deeper from here?
Use the prime checker for verdicts, the factors page for the full divisor list, and the totient page for φ(n) theory.

Related Calculators

Explore more calculators related to this topic.

Related Guides

Deepen your understanding with these educational resources.

Glossary

Technical terms used in mortgage calculations explained in plain language.

Prime number
Integer above 1 with exactly two divisors.
Composite number
Integer above 1 that is not prime.
Divisor count τ(n)
How many positive integers divide n.
Divisor sum σ(n)
Total of all positive divisors of n.
Euler totient φ(n)
Count of residues 1..n coprime to n.
Prime factorization
Unique product of prime powers equal to n.
Coprime
Two numbers sharing no prime factor (GCD 1).
Trial division
Testing divisors ascending from 2 up to √n.

Authoritative References

Trusted sources and standards referenced by this calculator.

Applicable Standards

Common Core 6.NS.B.4 — factors, multiples, and primesNCTM Number and Operations — divisibility and number structure

Was This Calculator Helpful?

Page Information

Last Updated:

2026-09-29

Version:

2.0.0

License:

Free to use for educational and professional purposes.