time = difficulty * 2**32 / hashrate
If you need to see the math:
Given (by you):
time = 90 days
difficulty = 1,000,000,000
Solve for:
hashrate in TH/s
90 days * 86,400 seconds per day = 1,000,000,000 * 2
32hashes / hashrate
7,776,000 = 1,000,000,000 * 4,294,967,296 / hashrate
7,776,000 seconds = 4,294,967,296,000,000,000 hashes / hashrate
hashrate * 7,776,000 seconds = 4,294,967,296,000,000,000 hashes
hashrate = 4,294,967,296,000,000,000 hashes / 7,776,000 seconds
hashrate = 552,336,329,218 hashes per second
552,336,329,218 hashes/s = 552.336329218 GH/s = 0.552336329218 TH/s
0.552336329218 TH/s to average 1 block solved every 90 days with 1,000,000,000 difficulty.Did I get the maths right there? I think so.