We study boron-doped single-walled carbon nanotubes by using first-principles methods based on the density functional theory. The total energy, band structure, and density of states are calculated. From the formation energy of boron-doped nanotubes with different diameters, it is found that a narrower tube needs a smaller energy cost to substitute a carbon atom with a boron atom. By using the result of different doping rates in the (10,0) tube, we extrapolate the result to low boron density limit and find that the ionization energy of the acceptor impurity level should be approximately 0.2 eV. Furthermore, we discuss the doping rate dependence of the density of states at the Fermi level, which is important to realize superconductivity.