Calibrating X/Y/Z Stepper Motors in Firmware

Print a 20MMx20MMx20MM Calibration Cube ensure the sides are marked with the correct Axis, Measure the cube. Take the "DEFAULT_AXIS_STEPS_PER_UNIT" Settings in the configuration marlin file.

The Formula is 

(20*X)/Y

X = the value set for your current steps

Y = Measurement value

The result will be the new steps per mm required to calibrate the machine.