theoretically, you could make an estimation by using the formula:
The expected number of hashes we need to calculate to find a block with difficulty D is therefore
D * 2**256 / (0xffff * 2**208)
That could be found on page
https://en.bitcoin.it/wiki/DifficultyThere's even an example written on this page

OFfcourse, it'll take a lot of grunt work... You'll have to find the difficulty for every batch of 2016 blocks, then calculate the number of hashes to find one block (and multiply by 2016), then do this for every group of blocks per retarget period.
It is also important to note that there is competition between mining pools.
So you have to multiply this number by the number of pools, as they also calculated hashed, but that work was lost as someone found the nonce first