<p>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.</p>

<p>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).</p>

<p>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.</p>

<p>At this website you can play around with the number of inputs, outputs and address type, and the respective fee for the transaction.
<a href="https://www.buybitcoinworldwide.com/fee-calculator/" rel="nofollow noreferrer">https://www.buybitcoinworldwide.com/fee-calculator/</a></p>

CC BY-SA 4.0
2020-05-24T11:00:12.357Z
2020-05-24T11:00:12.357Z
bitm
<p>Format for 1 input 2 outputs (1 to receiver, 1 change to owner). Normal non-seg transaction</p>

<p>P2SH    73 bytes(input) 32x2 (output)</p>

<p>P2PKH  about the same as P2SH </p>

<p>To reduce fees reduce </p>

<p>a) no of inputs.</p>

<p>b) Use exact match (with no change output) if possible.  </p>

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

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

<p>Output format 2of3 multisignature
      Input size    Out size</p>

<p>P2SH    297 32</p>

<p>P2SH-P2WSH  140 32  Wrapped Segwit </p>

<p>P2WSH   105 43 Native Segwitness </p>

<p>P2TR    58* 43 Pay to Taproot</p>

<p>P2PKH   148 34</p>

<ul>
<li>means the recovery is more expensive.</li>
</ul>

<p>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.</p>

<p>(up to byte level where U can actually count).</p>

CC BY-SA 4.0
2020-05-24T04:10:35.350Z
2020-05-24T04:10:35.350Z
Cisco Mmu
<p>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?</p>

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

<p>thanks a lot.</p>

CC BY-SA 4.0
2020-06-15T00:35:34.327Z
Does this answer your question? [What is the size of different Bitcoin transaction types?](https://bitcoin.stackexchange.com/q/66428/5406)
Murch
<bitcoin-core><wallet><transaction-fees><segregated-witness>
Does number of inputs or outputs affect bitcoin transaction fee?
andrew007
# Does number of inputs or outputs affect bitcoin transaction fee?

(Asked by: username_0 on 2020-05-24)

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.

**Tags:** bitcoin-core, wallet, transaction-fees, segregated-witness

> **Comments:**
> **username_1**: Does this answer your question? [What is the size of different Bitcoin transaction types?](https://bitcoin.stackexchange.com/q/66428/5406)  

---

## 2 answers

### Answer by username_2 on 2020-05-24. Score: 1

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/>


---

### Answer by username_3 on 2020-05-24. Score: 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).


---

