Trying to Implement Fall Damage

I want to implement Fall Damage using C++. I want to get the Downward Velocity and Using That Velocity I want to Calculate Fall Damage. But I don’t know How to do that.