# Difficulty in obtaining vanity Bitcoin addresses

What is the formula I can use to estimate the difficulty in generating vanity Bitcoin addresses?

• Note that address reuse (and therefore vanity addresses) are bad for privacy for yourself as well as everyone else. Commented May 31, 2016 at 17:05

It is better to explain by example:

We need to find a vanity address with the prefix "1Love".

1. The minimum address with this prefix is "1Love1111...1111+ControlSum" and this corresponds to the number Xmin.

2. The maximum address with this prefix is "1Lovezzzz...zzzz+ControlSum" and this corresponds to the number Xmax.

("1" and "z" are the first and last character of the Base58 encoding used in the bitcoin addresses https://en.wikipedia.org/wiki/Base58)

Then the difficulty of finding such a vanity address is:

``````diff = (Total number of bitcoin addresses) / (Xmax - Xmin)
``````

For the prefix consisting of the characters "1" there is a special case and complexity that must be considered differently.

• Is not `(Xmax - Xmin)` always equal `58^m`?
– k06a
Commented Oct 8, 2017 at 21:19

The probabilities are detailed here:

https://en.bitcoin.it/wiki/Vanitygen#Difficulty_of_finding_a_vanity

"The difficult of finding a vanity address depends on its exact structure (leading letters and numbers) and how likely such an output is given the algorithms involved, which can consist of several pivots where the difficulty suddenly changes."

Difficulty can be quite easy or quite hard depending on the structure and length of the vanity portion of your address