How to calculate speed without rigid body

How can I calculate speed without a rigid body? I am using this so if the character reaches a certain speed it will make the model crossfade into a animation.

How are you moving your object if you don’t have a Rigidbody? If you are using a CharacterController, then you can likely use CharacterController.velocity. If you are moving it through direct manipulation of the Transform, then your speed will be encoded in your movement code.

If you really need to do it without any internal information. You can take save the position each frame. The the magnitude of the difference between the last position and the current position divided by Time.deltaTime will be the speed.

 var speed = (transform.position - lasPos).magnitude / Time.deltaTime;

Rather than a single frame, you may want to average the result over several frames, or you may want to only sample at fixed intervals.