The datasheet for most transistors shows a max saturation voltage with a very high base current of 1/10th the collector current, even if the transistor has a current gain of 800!
The minimum current gain of a 2N3904 with a 40mA load is about 65 and it is guaranteed to have no more than 1.0V saturation voltage with a base current of only 0.62mA. So you can gamble a little and use a base current that is 1/20th of the load current and most transistors will saturate fine.