Transistor base resistor calculations

When using a transistor as a switch, typically the base current drive provided is one-tenth of the collector current being switched. This is also the condition at which Vce(sat) is usually quoted on the datasheet. The 2N3904 datasheet gives:

VCE(sat) Collector-Emitter Saturation Voltage:
IC = 10mA, IB = 1.0mA -> 0.2V
IC = 50mA, IB = 5.0mA -> 0.3V

I wouldn't use a 2N3904 to switch more than 50mA, I'd use something with good hfe and specified Vce(sat) at higher current, such as BC327.