Is the formula correct
Generally.
The typical approach is to determine the current you will need to switch. In this case, it is 100ma.
beta as specified in a datasheet is for linear applications and has no meaning for a switching application. Typically, people use a "beta" of 10 for switching application, to make sure that the transistor is saturating hard.
So you need a base current of 100ma / 10 = 10ma.
Between your pin's output (close to 5v but you can check the datasheet), the base resistor, and the Vbe of the transistor, you need to drop about 5v. That means the voltage drop on the base resistor is about 5 - Vbe = 4.3v (3.6v for a darlington).
4.3v / 10ma = 430ohm.
I typically use 330ohm or 390ohm.