Strobogrammatic Number Calculator
Number Theory
- A strobogrammatic number reads the same after a 180-degree rotation. Only the digits 0, 1, 6, 8 and 9 survive rotation: 0, 1 and 8 map to themselves, while 6 and 9 swap.
- Reverse 619 and swap 6 and 9 to get its rotated form: 619.
- Rotating 619 by 180 degrees gives 619, which matches the original.
- There are only 7 strobogrammatic numbers up to 100 (0, 1, 8, 11, 69, 88, 96) and 19 up to 1,000.
A strobogrammatic number reads the same after you rotate it 180 degrees - turn the page upside down and nothing changes. 69 becomes 69, 88 stays 88, and 619, delightfully, becomes 619. The idea is old enough to have entertained calculator owners for generations, and precise enough to be a proper sequence in the OEIS.
Only five digits can take part: 0, 1 and 8 rotate onto themselves, while 6 and 9 rotate onto each other. Any number containing 2, 3, 4, 5 or 7 is disqualified before you even check the rotation. This calculator tests a candidate by actually performing the rotation, and its list mode enumerates every strobogrammatic number up to your bound - 7 up to 100, 19 up to 1,000.
The counts grow slowly because the constraint is severe: a strobogrammatic number is determined by its first half, with the second half forced to be the rotated mirror. That is also what makes them charming in the wild - on digital clocks, odometers and the famous year 1961, the most recent year that read the same upside down.
Worked examples
Test 619 - reads the same upside down
(Test a number · 619 · 1000)
| Strobogrammatic result | Yes - 619 is strobogrammatic |
| Rotated form | 619 |
| Tested value | 619 |
| Usable digits | 0, 1, 6, 8, 9 |
Test 123 - digit 2 cannot rotate
(Test a number · 123 · 1000)
| Strobogrammatic result | No - 123 is not strobogrammatic |
| Rotated form | - |
| Tested value | 123 |
| Usable digits | 0, 1, 6, 8, 9 |
List strobogrammatic numbers up to 1,000
(List numbers up to a bound · 619 · 1000)
| Strobogrammatic result | 19 strobogrammatic numbers up to 1,000 |
| Largest in range | 986 |
| Count | 19 |
| Usable digits | 0, 1, 6, 8, 9 |
The five usable digits
Rotation is a physical operation, so the digit shapes decide everything. In the standard seven-segment and printed forms, 0, 1 and 8 are symmetric under a half-turn. 6 and 9 are a matched pair - rotate a 6 and you get a 9, rotate a 9 and you get a 6. The remaining digits break: 2 and 5 rotate into shapes that are not digits in normal fonts, and 3, 4 and 7 are hopeless.
Font choice matters at the margins - a 1 drawn with a base and flag can fail, and some puzzle traditions admit 2 and 5 as a swapped pair in seven-segment displays. This calculator uses the standard mathematical convention, digits 0, 1, 6, 8 and 9 only, which matches the OEIS sequence A000787.
How the test works
The test is the definition, executed literally: reverse the digit string, replace each digit by its rotated partner, and compare with the original. 619 reversed is 916; mapping 9 to 6, 1 to 1 and 6 to 9 gives 619 - a match. 123 fails earlier, at the digit check, because 2 and 3 have no partners.
Odd-length numbers have one extra rule hiding inside the comparison: the middle digit rotates in place, so it must map to itself - only 0, 1 or 8 can sit in the centre. That is why 101 and 181 work but 619's cousin 669 fails: its centre 6 would need to become 9 in the same position. The brute-force check handles all of this automatically, which is the advantage of testing by simulation over testing by rules.
Counting them
Up to 100 there are exactly 7: 0, 1, 8, 11, 69, 88 and 96. Up to 1,000 there are 19, adding the three-digit family built by wrapping a self-symmetric middle digit in a rotation pair - 101, 111, 181, 609, 619, 689, 808, 818, 888, 906, 916 and 986. Constructively, a number of even length is fixed by choosing its first half from the allowed digits (with a nonzero lead), and odd lengths add the choice of a central 0, 1 or 8.
Because the second half is forced, the count grows like a square root of the range rather than with the range itself. List mode on this page brute-forces every integer to the bound, which is exact and, at these sizes, instant.
Strobogrammatic primes and other refinements
Intersect the idea with primality and you get strobogrammatic primes - 11, 101, 181, 619 and their kin - a sparse and pretty family. There are also strobogrammatic squares, and 'strobogrammatic' dates and times beloved of puzzle setters. The year 1961 remains the celebrity example: rotate it and 1961 stares back, a trick no year since has repeated and none will until 6009.
Definitions vary slightly across these playgrounds - some admit 2 and 5 on seven-segment displays, some exclude 0 as a standalone. The calculator states its convention on the page and applies it uniformly, so a 'no' here always means 'no under the standard digit set'.
Where they show up
Calculator spelling is the ancestral home: turn a display upside down and 0.7734 becomes hELL.O. Strobogrammatic numbers proper appear in puzzle books, on odometer photographs people take at 69, 88 and 1001 miles, and in the design of ambigrams - words and numbers drawn to read under rotation, an art form Douglas Hofstadter named and popularised.
There is also a serious use: rotationally symmetric numerals are a genuine design consideration anywhere a reading must survive being viewed upside down - certain signage, packaging and instrument dials. The mathematics of which strings survive rotation is the same, whether the application is a puzzle or a parachute altimeter.
Testing versus listing
Use test mode for a single candidate - a year, a house number, a score - where the rotated form shown in the result lets you verify the verdict with your own eyes. Use list mode to explore a range or audit a claim about counts: the enumeration is exhaustive, so '19 up to 1,000' is a complete census, not a sample.
If a list from elsewhere disagrees with this page's, the usual culprits are the digit-set convention (2 and 5 admitted or not) and whether 0 is counted. Both are stated here so the discrepancy can be diagnosed rather than argued about.
Building one by hand
Construction is easier than testing. Choose a first half from the allowed digits, choose a centre digit from 0, 1 or 8 if the length is odd, then complete the number by appending the rotated mirror of the first half. Start with 6, pick centre 1, and the mirror of 6 is 9: the result is 619, strobogrammatic by construction. Start with 10 and no centre: mirror of '10' rotated is '01'... appended it gives 1001, the smallest four-digit example - check: reverse 1001, map the digits, and 1001 returns.
This constructive view explains the census counts: the number of strobogrammatic numbers of a given length is a product of small choices - a few options for the leading digit, five for each subsequent pair position, three for a centre - which is why the counts grow geometrically in the length while remaining a vanishing fraction of all numbers.
Ambigram art and Scott Kim
The artistic wing of the subject is the ambigram - lettering designed to read under rotation or reflection - developed by Douglas Hofstadter and Scott Kim in the late 1970s. Numeric strobogrammatism is the ambigram idea restricted to digits, where the alphabet of shapes is fixed by the numeral system rather than invented by the artist. Kim's book Inversions remains the classic gallery of what rotational symmetry can be persuaded to say.
The calculator's convention - digits 0, 1, 6, 8, 9 only - is the strict mathematical one. Ambigram artists cheat gloriously with letterforms; arithmetic cannot, which is why the strobogrammatic numbers are a sequence with a census rather than a matter of taste.
Does 0 count?
Sources differ on whether to list 0 itself as strobogrammatic: it rotates to itself trivially, and some lists begin at 1 or at 11. The OEIS includes it, and this calculator follows the OEIS - test mode accepts 0 as strobogrammatic, and the census counts quoted on this page (7 below 100, 19 below 1,000) include it. If a comparison list is one shorter at every bound, this convention is almost certainly the whole disagreement.
The same applies to numbers with leading zeros, which are not numbers at all in this context: 010 reads as 10 with decoration, and the calculator tests the canonical digit string you enter, as mathematics requires.
Palindromic is not the same thing
Two symmetries are often confused. A palindrome reads the same when its digits are reversed: 121, 1331. A strobogrammatic number reads the same when the page is rotated: a physical operation that also changes the digits themselves. The families overlap but neither contains the other - 121 is a palindrome that fails here because 2 has no rotated form; 69 is strobogrammatic but no palindrome; 101 and 88 are both.
The distinction matters when searching the literature: databases file them separately, and a list of 'numbers that read the same upside down' that includes 121 has confused rotation with reversal. This page tests rotation, the operation you can perform with the paper in your hands - the calculator's verdict for 121 is no, and for 69 is yes, and that pair of answers is the whole difference in miniature.
FAQs
What is a strobogrammatic number?
A number that reads the same after a 180-degree rotation, using only the digits 0, 1, 6, 8 and 9 - for example 69, 88, 619 and 1001.
Which digits can appear in a strobogrammatic number?
Only 0, 1, 6, 8 and 9. Digits 0, 1 and 8 rotate onto themselves; 6 and 9 swap with each other.
Is 619 strobogrammatic?
Yes. Reversing 619 and swapping 6 and 9 gives 619 back.
How many strobogrammatic numbers are under 100?
7: 0, 1, 8, 11, 69, 88 and 96.
How many are under 1,000?
19, including 101, 609, 619, 689 and 986.
Why can't the middle digit be 6 or 9?
In an odd-length number the centre digit rotates in place, so it must map to itself - only 0, 1 or 8 qualify.
Is 2002 strobogrammatic?
No - the digit 2 has no upside-down partner, so any number containing it fails immediately.
What was the most recent strobogrammatic year?
1961. The next one is 6009.