You might do better to have a fixed high frequency timer interrupt and use DDS techniques (direct digital synthesis). For instance if your stepper's max step rate is 1000 a second, you can have the timer interrupt running at say 10kHz.
For DDS you have a phase accumulator variable and a frequency variable and regularly do:
phase_acc += frequency ;
For a stepper motor you would then use the top-bit of the phase_acc variable to be the step clock, and the sign of the frequency variable as the direction pin output. As an example if your interrupt was running at 10kHz and you wanted 30 steps a second you'd use frequency = 197 (Assuming phase_inc is a 16 bit int). Then each second the phase_inc is increased by 1970000 (which would overflow the 16bit value 30 times (approx) and thus generate 30 steps if the top bit is used to drive the pin.
volatile int frequency = 0 ;
volatile int phase_inc = 0 ;
void my_isr ()
{
phase_inc += frequency ;
digitalWrite (dir_pin, frequency < 0 ? HIGH : LOW) ;
digitalWrite (step_pin, phase_inc < 0 : HIGH : LOW) ;
}
For greater resolution and accuracy long variables can be used...