<p>Both outputs and inputs differ in size depending on the address format.</p>

<p>P2PKH outputs are 34 bytes and P2SH outputs are 32 bytes.</p>

<p>P2PKH inputs are 148 bytes (180 bytes for uncompressed keys), and P2SH inputs are of variable size depending on the redeem script they need to fulfill. For example, a 2-of-3 multisig P2SH input (a very common P2SH use) has 297 bytes.</p>

CC BY-SA 4.0
2018-01-03T07:16:57.097Z
2019-01-17T19:41:40.517Z
2019-01-17T19:41:40.517Z
Murch
<p>For instance, we have two outputs, output X sends to a P2SH address, and output Z sends to a P2PKH address.</p>

<p>Would output X have a different transaction size than output Z? What about the size of the inputs, is that affected by the address type?</p>

CC BY-SA 4.0
2018-12-04T18:56:41.403Z
I've written a more comprehensive answer on the same topic that also covers segwit formats and more here: https://bitcoin.stackexchange.com/q/66428/5406
Murch
<transaction-input><output><address-format>
Does input and output size vary by address type?
Tailer
# Does input and output size vary by address type?

(Asked by: username_0 on 2018-01-03)

For instance, we have two outputs, output X sends to a P2SH address, and output Z sends to a P2PKH address.

Would output X have a different transaction size than output Z? What about the size of the inputs, is that affected by the address type?

**Tags:** transaction-input, output, address-format

> **Comments:**
> **username_1**: I've written a more comprehensive answer on the same topic that also covers segwit formats and more here: https://bitcoin.stackexchange.com/q/66428/5406  

---

## 1 answers

### Answer by username_1 on 2018-01-03. Score: 1 | Accepted answer

Both outputs and inputs differ in size depending on the address format.

P2PKH outputs are 34 bytes and P2SH outputs are 32 bytes.

P2PKH inputs are 148 bytes (180 bytes for uncompressed keys), and P2SH inputs are of variable size depending on the redeem script they need to fulfill. For example, a 2-of-3 multisig P2SH input (a very common P2SH use) has 297 bytes.


---

