Ok, a bipolar transistor is a current controlled device. You set the current into the base (to the emitter) to control the current flow into the collector (reverse from a pnp).
The current gain is in the data sheet as hfe (DC current gain) which is between 110 and 800. When using the transistor as a switch use the lowest hfe value in the calculations to ensure transistor saturation. So the base current times hfe equals collector current (Ibe * hfe = Ic), where Ic is the max current needed to power the relay, or relay coil voltage divided by the relay coil resistance, Icoil = Vcoil/Rcoil.
The base resistor then sets (or limits) the base current. So base resistor value is the IO high voltage minus the base-emitter voltage (about 0.6V) divided by the required base current, R = ((ioV - Vb)/Ib).
Since I don't know the relay's coil resistance I can't calculate the base resistor value but instead gave you the information required to calculate the base resistor value.