Repdigit Calculator

Build the number made by repeating one digit a chosen number of times, with the digit count shown.

Math and PercentUpdated 2026-11-182 min read
Repdigit Calculator
A single digit from 0 to 9.
A whole number from 1 to 1,000.
Repdigit value
...
Number of digits...
Repeated digit...

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

  1. Enter a digit d from 0 to 9.
  2. Enter the repeat count k from 1 to 1,000.
  3. Read the repdigit value in the main result box.
  4. Check the digit count and the repeated digit beside it.
  5. The defaults d = 7 and k = 4 reproduce the worked example.
  6. Try d = 0 to see that repeating zero gives zero.

Formula

repdigit(d, k) = d x R(k) = d x (10^k - 1) / 9, written as k copies of the digit d
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.

  1. Write the repunit of length four: R(4) = 1111.
  2. Multiply by the digit: 7 x 1111 = 7777.
  3. Equivalently, write the digit 7 four times in a row.
  4. The tool reports 7777, four digits, and repeated digit 7.
  5. With digit 0 and the same length the result would be 0.

Reference table

Repdigits for small digit and length pairs
dkValueDigits
0301
52552
7477774
939993
15111115

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.

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.