I think some more detail will help me find a good starting point for you. Is this stopping distance from full speed / whatever the current speed is?
Also, what’s your expected output / result from the final calculation?
Is it in meters or something similar?