How do you calculate the peak current of an electric motor?
The maximum current in a permanent magnet motor is governed by two things, which are in order of importance ...

a) demagnetisation of the permanent magnets

b) heating

Demagnetisation will kill your motor in an instant, if the current goes over this limit at all, it's game over. Fortunately, it takes a rather large current to do it. Unless the manufacturer specifies it directly, it can be rather difficult / impossible to infer from the other specifications. You can assume it's above the peak rated current, but by what safety factor, 2x, 5x, 10x ? If it's not in the data sheet, one way is to contact the manufacturer, another is to test a motor, with the expectation of destroying it. After demagnetisation, the Kt will be lower, zero or even reversed, a quick measurement of output torque will detect this.

Heating is a bit more tractable, but still needs some guesswork. The limitation is the temperature of the windings, as the insulation is good only up to a certain temperature. Fortunately it's easy to estimate the temperature of the windings by measuring their resistance, copper has a relatively large 10% change in resistance for every 25C increase in temperature. Unfortunately, the specs probably do not tell you what the limiting temperature on the windings is. Best is to play safe and assume (say) 80C for the max temperature, \$t_{max}\$

The method is to measure the approximate \$I^2t_{max}\$ of the windings. Measure the starting temperature \$t_{initial}\$. Apply a 10 second pulse (short enough to be roughly adiabatic, long enough to be useful) of rated current, and estimate the temperature rise from the change in resistance. The \$I^2t\$ you have just applied, \$I^2t_{test}\$, is 10*Irated*Irated. The maximum \$I^2t\$ you can apply safely, \$I^2t_{max}\$, is $$I^2t_{max}=\frac{t_{max}-t_{initial}}{ temperature rise}I^2t_{test}$$

The maximum you can apply on thermal grounds is any current I, as long as the application time is less than $$\frac{I^2t_{max}}{I^2}$$ in a single pulse, starting with a cold motor. If you apply multiple pulses, then you must use less current, to keep the temperature down.