Repdigit Calculator
Build the number made by repeating one digit a chosen number of times, with the digit count shown.
What it does
A repdigit is a number whose decimal digits are all the same. Examples include 7, 22, 555 and 9999. The name is a contraction of repeated digit, and these numbers are also called monodigit numbers.
Every repdigit is a multiple of a repunit. Repeating the digit d exactly k times gives d times R(k), where R(k) is the number made of k ones. That connection makes repdigits easy to construct once the repunit is known.
This page takes a digit and a repeat count, then prints the resulting decimal string. The value is built directly as a string of repeated characters, so it is exact even when the number has a thousand digits.
Repeating zero is allowed and produces zero regardless of the length. That convention matches the standard sequence, which begins with zero and the single digits.
The repeat count is limited to one thousand, which keeps the displayed result readable. Digit inputs outside zero through nine are rejected.
How to use
- Enter a digit d from 0 to 9.
- Enter the repeat count k from 1 to 1,000.
- Read the repdigit value in the main result box.
- Check the digit count and the repeated digit beside it.
- The defaults d = 7 and k = 4 reproduce the worked example.
- Try d = 0 to see that repeating zero gives zero.
Formula
- d
- The single digit being repeated, from 0 to 9.
- k
- How many times the digit is repeated.
- R(k)
- The repunit with k ones.
The value is the product of the digit and the repunit of the same length. Building it as a repeated string avoids any floating point rounding. The case d = 0 gives zero for every length.
Worked example
Example: digit 7, four times
The page opens with d = 7 and k = 4.
- Write the repunit of length four: R(4) = 1111.
- Multiply by the digit: 7 x 1111 = 7777.
- Equivalently, write the digit 7 four times in a row.
- The tool reports 7777, four digits, and repeated digit 7.
- With digit 0 and the same length the result would be 0.
Reference table
| d | k | Value | Digits |
|---|---|---|---|
| 0 | 3 | 0 | 1 |
| 5 | 2 | 55 | 2 |
| 7 | 4 | 7777 | 4 |
| 9 | 3 | 999 | 3 |
| 1 | 5 | 11111 | 5 |
Limits
- Only one digit from 0 to 9 is accepted.
- The repeat count is limited to 1,000 to keep the output short.
- Zero is printed as 0 rather than a string of zeros.
- The tool prints the value, it does not factor it.
Common mistakes
- Entering a multi digit value in the digit field.
- Using length zero, which is not allowed here.
- Thinking that repeating zero gives a long string of zeros in the value.
- Confusing repdigits with palindromes, which need not use one digit.
- Using a rounded product for long lengths.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the repdigit for d = 7 and k = 4?
7777.
What is the repdigit for d = 5 and k = 2?
55.
What happens when d = 0?
The value is 0 for any repeat count.
Questions
What is another name for a repdigit?
It is also called a monodigit number.
How does this relate to repunits?
A repdigit is the digit multiplied by the repunit of the same length.
Is zero a repdigit?
Yes, by the standard convention.
Are all repdigits palindromes?
Yes, because a string of identical digits reads the same backwards.
Are results exact?
Yes, they are built as decimal strings.
What repeat count is accepted?
Any whole number from 1 through 1,000.