there is no formula.
training is much harder than inference, and typically is not performed online. to give you a rough reference, it took me 2-3 days of CPU time to train a 400 neuron spiking neural network with STPD. the input set consisted of the MNIST database of 27x27 pixel images that represent handwritten digits. The time to train will change based on input size and characteristics, target accuracy, network architecture, and so on. too many parameters to generalise in one equation.