0

I would like to know how inputs and outputs affects my bitcoin transaction fee using legacy address, and how using a segwit address will decrease the same transaction?

and how they will be calculated? if input and outputs affects how can avoid that, apart of segwit address method?

thanks a lot.

0

Format for 1 input 2 outputs (1 to receiver, 1 change to owner). Normal non-seg transaction

P2SH 73 bytes(input) 32x2 (output)

P2PKH about the same as P2SH

To reduce fees reduce

a) no of inputs.

b) Use exact match (with no change output) if possible.

c) when fee is low, use more inputs or consolidate your input to fewer UTXO.(reduction of input for your future tx).

I think fee reduction increases a lot when you use multi-sig using seg-wit.

Output format 2of3 multisignature Input size Out size

P2SH 297 32

P2SH-P2WSH 140 32 Wrapped Segwit

P2WSH 105 43 Native Segwitness

P2TR 58* 43 Pay to Taproot

P2PKH 148 34

  • means the recovery is more expensive.

To be actually sure of saving then you may want to go through the exercise of manually decoding every different type of bitcoin TX with various no of input and output.

(up to byte level where U can actually count).

| improve this answer | |
  • thanks a lot for the response. – andrew007 Jun 15 at 16:54
0

The number of inputs and outputs affect transaction size (bytes). The more inputs/outpus you have, the larger is the transaction size. Segwit addresses reduces transaction size.

So the best is to always consolidate your inputs when the fees are low, so that we the network is congested you can make a transaction with a single input and two outputs (one for change).

To consolidate inputs just make a transaction with the inputs you want to consolidate to an address of yours. Electrum wallet allows you to choose which input you want to expend.

At this website you can play around with the number of inputs, outputs and address type, and the respective fee for the transaction. https://www.buybitcoinworldwide.com/fee-calculator/

| improve this answer | |
  • thanks a lot for the response. – andrew007 Jun 15 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.