2

Is there an easy calculator to determine the block height on a certain day?

i.e what was the block height on 14th October?

This was asked by JoeNakamoto on Twitter.

There is a related question on converting block height to UNIX time here.

Michael Folkson
  • 14,337
  • 3
  • 11
  • 45

3 Answers3

3

There is blockheightat.sh script included in my bitcoin-scripts (requires running Bitcoin Core). Examples:

$ ./blockheightat.sh 2022-10-14
758524
$ ./blockheightat.sh "2022-10-14 13:37"
758612
Kristaps Kaupe
  • 355
  • 1
  • 8
2

There is a script here from jsarenik that does this.

You can run it like this:

$ ./grepdate.sh 2022-10-14 
758593

Alternatively there is a Google Sheets that seems to work.

Thanks to those on Twitter who answered.

Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
2

You can also estimate it like this:

h = (t-1213787930) / 596.066637

where t is the unix timestamp as stored in the block header. And h is the block height.

These values were derived using a least-squares fitting over the last 160000 blocks.

Note that theoretically bitcoin attempts to make the factor close to 600, but in practice the value of 600 is not reached.

Willem Hengeveld
  • 1,460
  • 11
  • 14