It is difficult to do without knowing the exact amount of time during the collision; and also involves intimate knowledge of the two objects elasticity/plasticity.
Here is a paper that will go through the a simple exercise.
depending where you are in the world, the codes generally cover this. for example bs 6399 pt 1 gives examples for car parks. the equation is based on simple energy absorption theory i.e. strain energy equals kinetic energy.