Automorphic Number Calculator

Check whether a number appears in the final digits of its own square, with the square shown.

Math and PercentUpdated 2026-11-182 min read
Automorphic Number Calculator
A whole number from 0 to 1,000,000.
Square of n
...
Final digits compared...
Classification...

What it does

An automorphic number is one whose square ends with the decimal digits of the number itself. For example 25 squared is 625, which finishes with 25. The name comes from a word meaning self shaping, describing the way the number reappears inside its square.

The sequence begins 0, 1, 5, 6, 25, 76, 376, 625 and 9376. There are two infinite families of decimal automorphic numbers, which is why examples keep appearing at longer digit lengths.

The test is a string comparison. Square the number, take as many final digits as the original number has, and check whether they match exactly. Leading zeros are not added, so the comparison uses the ordinary decimal spelling of the input.

This page computes the square with exact integer arithmetic and prints both the full square and the trailing block that was compared. That makes the verdict transparent even for a large square.

The input limit is one million, which keeps the square short enough to read at a glance.

How to use

  1. Enter a whole number n from 0 to 1,000,000.
  2. Read the classification in the main result box.
  3. Check the square shown beside it.
  4. Read the trailing digits that were compared with your input.
  5. The default n = 25 reproduces the worked example.
  6. Try n = 76 to confirm another automorphic value.

Formula

n is automorphic when n^2 mod 10^k = n, where k is the number of decimal digits of n
n
The integer being tested.
k
The number of decimal digits of n.
10^k
The power of ten used to isolate the final k digits.

The case n = 0 has one digit and is automorphic because zero squared is zero. The definition is base dependent, and this page always uses base ten. Matching is required for the exact number of digits, not a shorter prefix.

Worked example

Example: n = 25

The page opens with n = 25.

  1. Compute the square: 25 x 25 = 625.
  2. Count the digits of 25, which is 2.
  3. Take the final two digits of 625, which are 25.
  4. They match the original number exactly.
  5. The tool reports square 625, trailing digits 25, and Automorphic.
  6. For 25 the companion value 76 also works, since 76 squared is 5776.

Reference table

Small automorphic numbers
nn squaredTrailing digitsAutomorphic
000Yes
111Yes
5255Yes
6366Yes
2562525Yes
76577676Yes
2457676No

Limits

  • Inputs above 1,000,000 are rejected to keep the square short.
  • Only base ten endings are checked.
  • Leading zeros are not inserted to force a match.
  • The tool gives a verdict, not a search for automorphic values.

Common mistakes

  • Checking only the last digit when the number has more digits.
  • Comparing with leading zeros added to the square.
  • Assuming every number ending in 5 or 6 is automorphic.
  • Confusing this with an Armstrong number.
  • Using a rounded or floating point square.

Try it yourself

Quick checks. Answers sit tucked under each question.

Is 25 automorphic?

Yes, because 25 squared is 625, which ends in 25.

Is 76 automorphic?

Yes, because 76 squared is 5776, which ends in 76.

Is 24 automorphic?

No, because 24 squared is 576, which ends in 76.

Questions

What does automorphic mean?

It describes a number that reappears in the final digits of its own square.

Are there infinitely many?

Yes, there are two infinite decimal families of automorphic numbers.

Does the base matter?

Yes. This page only checks base ten.

Is zero automorphic?

Yes, since zero squared is zero.

Are the squares exact?

Yes. Integer arithmetic is used.

What input range is accepted?

Whole numbers from 0 through 1,000,000.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.