<p>Your transaction size calculation is incorrect. The inputs are 1 byte input count + 36 byte output + 1 byte scriptSig + 4 byte sequence + 1 byte witness stack count + 1 byte signature length + 71 byte signature + 1 byte pubkey length + 33 byte pubkey = 149 bytes for all of the input data. That along with 32 bytes for output, and 10 bytes for the rest of the transaction gives you a transaction 191 bytes in size.</p>

<p>So, blockchain.info correctly calculated the serialized size of your transaction. However that size is not the one that miners use for computing the feerate of a transaction since segwit data is discounted. Rather what they use is the fee per weight unit, which is the 34.526 sat/WU value that blockchain.info displays beneath the fee per byte feerate.</p>

<p>It's likely that whatever wallet you were using was using virtual bytes (vbytes) instead of weight units or actual bytes. Virtual bytes is just the size of the transaction but applying the segwit discount to the segwit data in the transaction. Your transaction is 110 vbytes, which gives you a feerate of 137.16 satoshis/vbyte. It's possible that when you told your wallet to use a 120 sat/byte feerate, it actually used a 120 sat/vbyte. However, when the transaction was actually made, the change that would have been left over from targeting that feerate would create a dust output, so it was rolled into the fee itself thus increasing the feerate that was actually paid.</p>

<blockquote>
  <p>Do miners take my transaction as I paid 120 sat/b or 78 sat/b?</p>
</blockquote>

<p>Your transaction has already been confirmed.</p>

CC BY-SA 4.0
2019-04-23T21:45:06.757Z
Hi, I don't understand how did you calculate the transaction? I don't see that you've calculated the input size.

 can you please simply calculate the transaction again?
Tailer
CC BY-SA 4.0
2019-04-23T21:46:12.837Z
I calculate usually the fee like this: $total = ($inputbytes + $outputbytes + 10) / 1000 * $btcPerKB. what am I missing? thanks
Tailer
CC BY-SA 4.0
2019-04-23T21:50:07.737Z
With segwit, some input bytes are treated differently. Those bytes are discounted and are worth 1/4th of the actual byte size. Doing the calculationg with that in mind gives you the vbytes. How are you calculating inputbytes?
Ava Chow
CC BY-SA 4.0
2019-04-23T21:56:48.140Z
for segwit bech32 each input worth 102 and each output 32 byte. that's how I'm doing :(
Tailer
CC BY-SA 4.0
2019-04-23T22:00:39.250Z
That's wrong. How did you get an input being 102 bytes? An P2WPKH input is ~65 vbytes
Ava Chow
CC BY-SA 4.0
2019-04-23T22:06:40.593Z
I'm a little bit confused how did I get that size, what's the different between vbyte and byte and what is segwit input size? what can I do to calculate that correctly?
Tailer
CC BY-SA 4.0
2019-04-23T22:39:17.140Z
A vbyte is a byte but with the segwit discount applied. A byte that is not part of the segwit data of a transaction is 1 vbyte. A byte that is part of the segwit data of a transaction is 0.25 vbytes. To calculate the vbytes correctly, look at the raw data for a segwit transaction (such as the one you asked about) and count the bytes for the segwit data and the non-segwit data separately. Divide the byte count for the segwit data by 4 to get its vbytes, and add to the non-segwit byte count for the total vbytes. I counted 65 vbytes for the input for your transaction.
Ava Chow
CC BY-SA 4.0
2019-04-23T21:22:07.187Z
2019-04-23T21:22:07.187Z
Ava Chow
<p>I have made a transaction and paid like 120 sat/B, on blockchain it says that I've paid 78.995 sat/B and noticed that transaction size is 191 (bytes) </p>

<p>Transaction size supposed to be: 102 (input) + 32 (output) + 10 (headers) = 144 Byte</p>

<p>Is this a problem of blockchain.info and transaction fee is right or the wallet didn't send the correct fees and Do miners take my transaction as I paid 120 sat/b or 78 sat/b?</p>

<p><a href="https://www.blockchain.com/btc/tx/87e4a93012116020d7c385d92a0d307363e8040bfb89800c709f66c47ca58316" rel="nofollow noreferrer">87e4a93012116020d7c385d92a0d307363e8040bfb89800c709f66c47ca58316</a></p>

CC BY-SA 4.0
2019-04-23T21:10:47.347Z
What wallet software are you using?
Ava Chow
<mining-pools><transaction-fees><blockchain.info><bech32-address>
Is Bech32 transaction on blockchain.info size accurate?
Tailer
# Is Bech32 transaction on blockchain.info size accurate?

(Asked by: username_0 on 2019-04-23)

I have made a transaction and paid like 120 sat/B, on blockchain it says that I've paid 78.995 sat/B and noticed that transaction size is 191 (bytes)

Transaction size supposed to be: 102 (input) + 32 (output) + 10 (headers) = 144 Byte

Is this a problem of blockchain.info and transaction fee is right or the wallet didn't send the correct fees and Do miners take my transaction as I paid 120 sat/b or 78 sat/b?

[87e4a93012116020d7c385d92a0d307363e8040bfb89800c709f66c47ca58316](https://www.blockchain.com/btc/tx/87e4a93012116020d7c385d92a0d307363e8040bfb89800c709f66c47ca58316)

**Tags:** mining-pools, transaction-fees, blockchain.info, bech32-address

> **Comments:**
> **username_1**: What wallet software are you using?  

---

## 1 answers

### Answer by username_1 on 2019-04-23. Score: 3 | Accepted answer

Your transaction size calculation is incorrect. The inputs are 1 byte input count + 36 byte output + 1 byte scriptSig + 4 byte sequence + 1 byte witness stack count + 1 byte signature length + 71 byte signature + 1 byte pubkey length + 33 byte pubkey = 149 bytes for all of the input data. That along with 32 bytes for output, and 10 bytes for the rest of the transaction gives you a transaction 191 bytes in size.

So, blockchain.info correctly calculated the serialized size of your transaction. However that size is not the one that miners use for computing the feerate of a transaction since segwit data is discounted. Rather what they use is the fee per weight unit, which is the 34.526 sat/WU value that blockchain.info displays beneath the fee per byte feerate.

It's likely that whatever wallet you were using was using virtual bytes (vbytes) instead of weight units or actual bytes. Virtual bytes is just the size of the transaction but applying the segwit discount to the segwit data in the transaction. Your transaction is 110 vbytes, which gives you a feerate of 137.16 satoshis/vbyte. It's possible that when you told your wallet to use a 120 sat/byte feerate, it actually used a 120 sat/vbyte. However, when the transaction was actually made, the change that would have been left over from targeting that feerate would create a dust output, so it was rolled into the fee itself thus increasing the feerate that was actually paid.

> Do miners take my transaction as I paid 120 sat/b or 78 sat/b?

Your transaction has already been confirmed.

> **Comments:**
> **username_0**: Hi, I don't understand how did you calculate the transaction? I don't see that you've calculated the input size.   can you please simply calculate the transaction again?  
> **username_0**: I calculate usually the fee like this: $total = ($inputbytes + $outputbytes + 10) / 1000 * $btcPerKB. what am I missing? thanks  
> **username_1**: With segwit, some input bytes are treated differently. Those bytes are discounted and are worth 1/4th of the actual byte size. Doing the calculationg with that in mind gives you the vbytes. How are you calculating inputbytes?  
> **username_0**: for segwit bech32 each input worth 102 and each output 32 byte. that's how I'm doing :(  
> **username_1**: That's wrong. How did you get an input being 102 bytes? An P2WPKH input is ~65 vbytes  
> **username_0**: I'm a little bit confused how did I get that size, what's the different between vbyte and byte and what is segwit input size? what can I do to calculate that correctly?  
> **username_1**: A vbyte is a byte but with the segwit discount applied. A byte that is not part of the segwit data of a transaction is 1 vbyte. A byte that is part of the segwit data of a transaction is 0.25 vbytes. To calculate the vbytes correctly, look at the raw data for a segwit transaction (such as the one you asked about) and count the bytes for the segwit data and the non-segwit data separately. Divide the byte count for the segwit data by 4 to get its vbytes, and add to the non-segwit byte count for the total vbytes. I counted 65 vbytes for the input for your transaction.  

---

