Yes i know, but i dont need a calculator, i need the formula that use the calculator
It looks like you like making life so hard for yourself. Lafu actually gave you the answer. You are going to consider a number of factors in your calculations and most of those factor such as the hash rate and difficulty change periodically.
Which means you are going to track the hastrate of a network to the minute you are going to make a calculation.