<p>There is blockheightat.sh script included in my <a href="https://github.com/kristapsk/bitcoin-scripts" rel="nofollow noreferrer">bitcoin-scripts</a> (requires running Bitcoin Core). Examples:</p>
<pre><code>$ ./blockheightat.sh 2022-10-14
758524
$ ./blockheightat.sh &quot;2022-10-14 13:37&quot;
758612
</code></pre>

CC BY-SA 4.0
2022-11-07T12:54:06.917Z
2022-11-07T12:54:06.917Z
Kristaps Kaupe
<p>You can also estimate it like this:</p>
<pre><code>h = (t-1213787930) / 596.066637
</code></pre>
<p>where <code>t</code> is the unix timestamp as stored in the block header.
And <code>h</code> is the block height.</p>
<p>These values were derived using a least-squares fitting over the last 160000 blocks.</p>
<p>Note that theoretically bitcoin attempts to make the factor close to <code>600</code>, but in practice the value of <code>600</code> is not reached.</p>

CC BY-SA 4.0
2022-11-08T11:33:27.450Z
2022-11-08T11:33:27.450Z
Willem Hengeveld
<p>There is a script <a href="https://github.com/jsarenik/price.bublina.eu.org/blob/master/grepdate.sh" rel="nofollow noreferrer">here</a> from jsarenik that does this.</p>
<p>You can run it like this:</p>
<pre><code>$ ./grepdate.sh 2022-10-14 
758593
</code></pre>
<p>Alternatively there is a <a href="https://docs.google.com/spreadsheets/d/1NiZFqp919BbWDwBLYs4k99LggnJdquVmSUjAfe-kUbA/" rel="nofollow noreferrer">Google Sheets</a> that seems to work.</p>
<p>Thanks to those on Twitter who answered.</p>

CC BY-SA 4.0
2022-11-07T12:40:26.193Z
2022-11-07T19:34:35.663Z
2022-11-07T19:34:35.663Z
Michael Folkson
<p>Is there an easy calculator to determine the block height on a certain day?</p>
<p>i.e what was the block height on 14th October?</p>
<p>This was asked by JoeNakamoto on <a href="https://twitter.com/JoeNakamoto/status/1589590600818782210?s=20&amp;t=QzU-Och8ZKxeLFPfNBd4cA" rel="nofollow noreferrer">Twitter</a>.</p>
<p>There is a related question on converting block height to UNIX time <a href="https://bitcoin.stackexchange.com/questions/93919/how-to-create-block-height-to-unix-time-converter">here</a>.</p>

<blockchain><height>
How can I determine the block height on a certain day?
Michael Folkson
# How can I determine the block height on a certain day?

(Asked by: username_0 on 2022-11-07)

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](https://twitter.com/JoeNakamoto/status/1589590600818782210?s=20&t=QzU-Och8ZKxeLFPfNBd4cA).

There is a related question on converting block height to UNIX time [here](https://bitcoin.stackexchange.com/questions/93919/how-to-create-block-height-to-unix-time-converter).

**Tags:** blockchain, height


---

## 3 answers

### Answer by username_1 on 2022-11-07. Score: 3 | Accepted answer

There is blockheightat.sh script included in my [bitcoin-scripts](https://github.com/kristapsk/bitcoin-scripts) (requires running Bitcoin Core). Examples:

```
$ ./blockheightat.sh 2022-10-14
758524
$ ./blockheightat.sh "2022-10-14 13:37"
758612

```


---

### Answer by username_2 on 2022-11-08. Score: 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.


---

### Answer by username_0 on 2022-11-07. Score: 2

There is a script [here](https://github.com/jsarenik/price.bublina.eu.org/blob/master/grepdate.sh) from jsarenik that does this.

You can run it like this:

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

```

Alternatively there is a [Google Sheets](https://docs.google.com/spreadsheets/d/1NiZFqp919BbWDwBLYs4k99LggnJdquVmSUjAfe-kUbA/) that seems to work.

Thanks to those on Twitter who answered.


---

