<p>Here are the results at block 472236</p>

<p>Processed 41823253 P2PKH txouts</p>

<ul>
<li>Fee is 0 satoshi/byte: 41823253 txouts are spendable having total value 12504138.52 BTC</li>
<li>Fee is 50 satoshi/byte: 28693175 txouts are spendable having total value 12503686.97 BTC</li>
<li>Fee is 100 satoshi/byte: 21753912 txouts are spendable having total value 12502819.35 BTC</li>
<li>Fee is 200 satoshi/byte: 16426255 txouts are spendable having total value 12501503.34 BTC</li>
<li>Fee is 300 satoshi/byte: 14808011 txouts are spendable having total value 12500784.29 BTC</li>
<li>Fee is 500 satoshi/byte: 13208366 txouts are spendable having total value 12499668.03 BTC</li>
<li>Fee is 1000 satoshi/byte: 10998782 txouts are spendable having total value 12496954.83 BTC</li>
</ul>

<p>This output was generated using a <a href="https://github.com/shivaenigma/bitcointools/tree/utxo_analysis" rel="nofollow noreferrer">fork of bitcointools</a>. This script reads utxo from <em>.bitcoin/chainstate</em> directory of a bitcoin node. Feel free to fork/use the script to generate related data later.</p>

CC BY-SA 3.0
2017-06-21T16:38:47.210Z
That's a great collection of stats. Going back to the original question, how many txouts are less than what's now the typical transaction fee?
MrJLP
CC BY-SA 3.0
2017-06-21T17:24:24.190Z
Hm.  Are you saying that the grand total of P2PKH txouts is 7.4 million BTC?  Given that about 16.4 million BTC have been mined, that's surprising.
Nate Eldredge
CC BY-SA 3.0
2017-06-21T17:43:41.593Z
@NateEldredge You are right. There seems to be an error in calculating the value, the  number of txouts is correct https://p2sh.info/dashboard/db/pay-to-pubkey-hash-statistics?orgId=1. I am checking the script for errors. Will update in sometime
dark knight
CC BY-SA 3.0
2017-06-21T17:50:34.663Z
I mean, it's not impossible, since other transaction types do exist.  But it would be surprising if true.
Nate Eldredge
CC BY-SA 3.0
2017-06-21T18:46:40.180Z
Fixed the error in value decompression method https://github.com/shivaenigma/bitcointools/commit/fb97687b9f67ab4af2caa5fb65f088e04208ee27 and updated the post. Results now match stats from other sources
dark knight
CC BY-SA 3.0
2017-06-26T01:07:07.857Z
Random request: it would also interesting to see the total number of utxos in each category (to get a feeling how many bytes in the database are effectively dead weight).
Pieter Wuille
CC BY-SA 3.0
2017-06-21T13:33:48.257Z
2017-06-21T18:44:36.187Z
2017-06-21T18:44:36.187Z
dark knight
<p>I define marginal fee cost as the number of bytes required to add that UTXO as an input to a TX multiplied by the satoshi/byte rate of the blocks being found.</p>

<p>So for a normal p2pkh UTXO, this would currently be roughly 180 bytes (number of bytes this UTXO would take up in a TX as an input) * 200 satoshi/byte, or 36000 satoshi. So the answer would be however many UTXOs exist that are 36000 satoshi or below for p2pkh. Essentially, I want to know how many UTXOs are currently in the UTXO set that would not be worth redeeming should the fees be above a certain satoshi/byte.</p>

<p>I would like this data at 100 satoshi/byte, 200 satoshi/byte, 300 satoshi/byte, 500 satoshi/byte and 1000 satoshi/byte.</p>

CC BY-SA 3.0
2017-03-07T10:16:22.260Z
Interesting question! Note, that a P2PKH input is 147 or 148 byte: [How big is the input of a P2PKH transaction?](http://bitcoin.stackexchange.com/q/48279/5406)
Murch
CC BY-SA 3.0
2017-03-07T13:27:17.913Z
Yes, that's for compressed pubkey. Uncompressed would be 32 more, which is 179 or 180, so I suppose it's impossible to tell which is which. Same with p2sh, which can have any redeemScript with compressed or uncompressed keys. An estimate is fine, though.
Jimmy Song
<blockchain><transaction-fees><utxo>
How many UTXOs have a marginal fee cost that's higher than its worth?
Jimmy Song
# How many UTXOs have a marginal fee cost that's higher than its worth?

(Asked by: username_0 on 2017-03-07)

I define marginal fee cost as the number of bytes required to add that UTXO as an input to a TX multiplied by the satoshi/byte rate of the blocks being found.

So for a normal p2pkh UTXO, this would currently be roughly 180 bytes (number of bytes this UTXO would take up in a TX as an input) \* 200 satoshi/byte, or 36000 satoshi. So the answer would be however many UTXOs exist that are 36000 satoshi or below for p2pkh. Essentially, I want to know how many UTXOs are currently in the UTXO set that would not be worth redeeming should the fees be above a certain satoshi/byte.

I would like this data at 100 satoshi/byte, 200 satoshi/byte, 300 satoshi/byte, 500 satoshi/byte and 1000 satoshi/byte.

**Tags:** blockchain, transaction-fees, utxo

> **Comments:**
> **username_1**: Interesting question! Note, that a P2PKH input is 147 or 148 byte: [How big is the input of a P2PKH transaction?](http://bitcoin.stackexchange.com/q/48279/5406)  
> **username_0**: Yes, that's for compressed pubkey. Uncompressed would be 32 more, which is 179 or 180, so I suppose it's impossible to tell which is which. Same with p2sh, which can have any redeemScript with compressed or uncompressed keys. An estimate is fine, though.  

---

## 1 answers

### Answer by username_2 on 2017-06-21. Score: 3

Here are the results at block 472236

Processed 41823253 P2PKH txouts

* Fee is 0 satoshi/byte: 41823253 txouts are spendable having total value 12504138.52 BTC
* Fee is 50 satoshi/byte: 28693175 txouts are spendable having total value 12503686.97 BTC
* Fee is 100 satoshi/byte: 21753912 txouts are spendable having total value 12502819.35 BTC
* Fee is 200 satoshi/byte: 16426255 txouts are spendable having total value 12501503.34 BTC
* Fee is 300 satoshi/byte: 14808011 txouts are spendable having total value 12500784.29 BTC
* Fee is 500 satoshi/byte: 13208366 txouts are spendable having total value 12499668.03 BTC
* Fee is 1000 satoshi/byte: 10998782 txouts are spendable having total value 12496954.83 BTC

This output was generated using a [fork of bitcointools](https://github.com/shivaenigma/bitcointools/tree/utxo_analysis). This script reads utxo from *.bitcoin/chainstate* directory of a bitcoin node. Feel free to fork/use the script to generate related data later.

> **Comments:**
> **username_3**: That's a great collection of stats. Going back to the original question, how many txouts are less than what's now the typical transaction fee?  
> **username_4**: Hm.  Are you saying that the grand total of P2PKH txouts is 7.4 million BTC?  Given that about 16.4 million BTC have been mined, that's surprising.  
> **username_2**: @username_4 You are right. There seems to be an error in calculating the value, the  number of txouts is correct https://p2sh.info/dashboard/db/pay-to-pubkey-hash-statistics?orgId=1. I am checking the script for errors. Will update in sometime  
> **username_4**: I mean, it's not impossible, since other transaction types do exist.  But it would be surprising if true.  
> **username_2**: Fixed the error in value decompression method https://github.com/shivaenigma/bitcointools/commit/fb97687b9f67ab4af2caa5fb65f088e04208ee27 and updated the post. Results now match stats from other sources  
> **username_5**: Random request: it would also interesting to see the total number of utxos in each category (to get a feeling how many bytes in the database are effectively dead weight).  

---

