Added equation to calc frequency