formula calculate profile grinding cost