Möbius Function Calculator screenshot

Möbius Function Calculator

Compute the Möbius function of a whole number from its prime factorisation, with the exact factor list printed.

Privacy First
0 Runs
Updated 2026-11-22
No upload
Instant
No signup

Möbius Function Calculator

Compute the Möbius function of a whole number from its prime factorisation, with the exact factor list printed.

How this page computes

The factorisation is found by trial division up to the square root, so the ceiling is one trillion and is stated. The empty product at 1 is 1, which is why the page returns 1 for that input rather than zero.

The calculation runs entirely in this browser tab; nothing is uploaded.

The page factors a whole number and returns its Möbius value: 0 when any prime repeats, otherwise 1 or minus 1 according to whether the count of distinct primes is even or odd.

Worked example: 30 is 2 times 3 times 5, so it has three distinct primes and the value is minus 1. The factorisation is printed beside the answer, so the sign is never a bare assertion.

How to use the Möbius Function Calculator

Enter one whole number and press Run. The first line gives the Möbius value and the second gives the prime factorisation, with repeated primes written as powers.

A third line explains the verdict: either the repeated prime that forces zero, or the parity of the distinct-prime count. The number 1 is a documented special case and returns 1.

The rule this page applies

The Möbius function is zero for a number with a squared prime factor, and otherwise minus one raised to the number of distinct prime factors. It is the coefficient that makes Möbius inversion work in number theory.

The factorisation is found by trial division up to the square root, so the ceiling is one trillion and is stated. The empty product at 1 is 1, which is why the page returns 1 for that input rather than zero.

What to Expect

Best for

  • Checking a Möbius value in a number theory exercise
  • Seeing the square-free condition directly
  • Getting an exact factorisation alongside the answer

Not ideal for

  • Values above one trillion
  • Möbius inversion of a whole sequence
  • Inputs that are not whole numbers

What this tool keeps

  • The exact factorisation and the signed value

What may need cleanup

  • Nothing: the value and the factorisation are final

Common errors

  • Zero is refused, because the factorisation starts at 1
  • A value above one trillion is refused with the ceiling named

Example use cases

  • Check that 30 maps to minus 1
  • See that 4 maps to 0 because 2 repeats

Sample input

30

Sample output

μ(30) = -1 30 = 2 × 3 × 5 3 distinct prime factors: odd count, so μ = -1

Who this is for

  • Number theory students
  • Readers checking a multiplicative function

Frequently asked questions

Why is the value zero for 4?

4 is 2 squared, so the prime 2 appears twice. A repeated prime makes the Möbius function zero, and the page names that prime in the explanation line.

What is the value at 1?

The Möbius function of 1 is 1, because 1 has no prime factor and the empty product is 1. The page prints that reason instead of an unexplained number.

Does the page prove the factorisation?

It finds it by trial division up to the square root and prints every prime with its power. For inputs up to one trillion that is a complete, exact factorisation, not a heuristic.

Is anything uploaded?

Nothing is uploaded. The numbers are read and the arithmetic runs in this browser tab with JavaScript, and reloading the page discards both the input and the result.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.