Theorem:
The depth of a red-black tree with n keys is no more than 2 lg(n).

Proof:
Let n be the number of keys (also nodes - one key per node) in a red-black tree. Let d be the height of the root (defined as max depth of any leaf), and let b denote the black-depth, which is the number of black nodes on any path from the root to a leaf, not counting the root itself.

Since there is never more than one red node in a row on a path from root to leaf, the maximum possible depth of a leaf is 2b, achieved when the colors alternate: black (root) → red → black → red → ... → black → red. We conclude d ≤ 2b + 1. [ This takes a little thought. Check it. ]

To get the greatest possible black depth for a given n, we consider the all black tree. A complete tree of depth b has 2b+1 - 1 nodes, so 2b+1 - 1 ≤ n. It follows (by adding 1 then taking logs) that b+1 ≤ lg(n+1), hence that b ≤ lg(n+1) - 1.

Substituting this bound for b in the inequality of the paragraph above, we have d ≤ 2(lg(n+1) - 1) + 1, which simplifies to d ≤ 2lg(n+1) - 1. Note that (for n > 2) we have 2lg(n+1) - 1 ≤ 2lg(n). We may simplify to d ≤ 2 lg(n). QED.