How to calculate Earthquake