Author

Topic: How many bytes do additional inputs add to a transaction? (Read 114 times)

HCP
legendary
Activity: 2086
Merit: 4361
Also, multisig can be a factor... if you have a 1-of-2, that'll result in smaller transaction that a 2-of-3 or a 3-of-5 etc... even if the number of inputs remains the same. The more signatures you need to add into a transaction, the larger it will grow.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
This approximation of the common inputs looks close enough: https://bitcoin.stackexchange.com/a/87276
That's if you don't need the actual numbers, otherwise getting SegWit inputs' virtual size will be complicated (example).
legendary
Activity: 3472
Merit: 10611
it depends on the output type that is being spent in your inputs!

each output has a locking script that requires an unlocking script in your input when you spend it. when the requirement for "unlocking" takes more space, the input can add more size to your final transaction.
for example your output could be a simple OP_TRUE and spending this requires no unlocking script so it only adds the fixed size of the outpoint (transaction hash and index) + sequence. or the output could be a very complex P2SH script that has OP_IF, OP_CheckMultiSig,... and the signature script could become a lot bigger.
in most cases you are either using P2PKH or P2WPKH and since these require a single public key + a single signature the script size is small.

there is also the matter of the difference between weight/virtual size and size. we no longer measure transaction sizes in raw bytes but instead in virtual bytes. essentially this means the legacy inputs result in a bigger virtual size than SegWit inputs which is why you end up paying less fee when using P2WPKH compared to P2PKH with the same number of inputs and outputs.

there is some tools that you can play around with input/output and visualize your transaction size/fees. there is  https://coinb.in/#fees and a new one by @bitmover https://bitcoindata.science/bitcoin-fee-size-calculator.html you can check out.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
On average, I would like to know by how many bytes does each input add to the transaction size, and whether larger inputs cause a larger byte count. I have a transaction that with 1 input and 2 outputs that is 200 bytes, and another with 5 inputs and 2 outputs with a size of 800 bytes, but I don’t think I can simply do a ratio calculation to get the average size.
Jump to: