calculate tone