Hey #[1]​! I’m certainly not an expert but I found these two good posts on how to calculate virtual size for a transaction and did it for the situation you mentioned.

https://bitcoin.stackexchange.com/questions/92689/how-is-the-size-of-a-bitcoin-transaction-calculated

https://bitcoin.stackexchange.com/questions/92587/calculate-transaction-fee-for-external-addresses-which-doesnt-belong-to-my-loca/92600#92600

All transactions will have at least 40 weight units

40 (weight unit of constant* fields in a transaction: version 16, num inputs 4, num outputs 4, locktime 16)

+

2 (this is a segwit tx so need to add marker and flag)

+

(3 * 272) (3 p2wpkh inputs)

+

(2 * 124) (1 p2wpkh output)

= 1106 WU (weight units)

1106 / 4 = 276.5

Need to round this up so it equals = 277vB

Reply to this note

Please Login to reply.

Discussion

I made a slight mistake. I calculated for 2 outputs instead of one like you said

Don’t worry, still right! There are always two outputs: Your own and the one for the miner’s fee 😎

The miners fee actually gets included in the coinbase tx of each block! For a normal tx you can calculate the fee by subtracting the sum of the outputs from the sum of the inputs. It’s pretty cool that the fee is implicit rather than an explicit utxo. It saves a lot of space on the chain

You never stop learning… This means that you are absolutely right and Sparrow’s 150 vB is correct. 277 - 124 = 153 vB. Case closed. Thank you very much 💜