Calculate pitch number