We introduce a notion of rank for $C^*$-algebras (or Banach algebras), which is viewed as a replacement of the topological stable rank of Rieffel. We study its basic properties and close relation with the stable rank. We also consider a replacement of the connected stable rank of Rieffel.