An internet search about "base resistor calculator online" gives a lot of hits.
Usually they come with description.
Read it first to avoid wrong input.
Especially with hfe - you won't use the value "40".
The B-E shunt resistor is responsible (or partly so)
for turnoff speed as a saturated switch. Do you
care about LH risetime at the collector node? If so,
characterize or find data for max temp, max "on"
base drive, min Vce(sat) switching w.r.t. the base
network impedance.