If you visit the web sites of companies that manufacturer quality stepper motors, you'll likely find documentation giving the theoretical way to calculate this. You'll need to know a lot about the mechanical load, and be prepared to do a fair amount of math. But if you are designing a printer to sell at a loss and make it up on ink... it's worth optimizing these things so you can use the cheapest motor that can meet your ramp speed requirements.
But in the more likely case, if you are building a one-off robot or hobby CNC machine or whatever, chances are you are going to buy the biggest motors you can get a good deal on (or you've already extracted them from that ancient printer), and then crank up the ramp-rate until you find it unreliable, then back off whatever safety factor you desire.
A well engineered and adjusted high voltage chopping drive amplifier will be necessary to get the maximum performance out of the motor without damaging its magnets.