<p>Spending a P2PKH output in an input of a transaction requires <code>4 * (36 + 1 + 1 + 33 + 1 + 72 + 4) = 592</code> weight units. Spending a P2SH-P2WPKH in an input of a transaction requires <code>4 * (36 + 1 + 1 + 22 + 4) + 1 + 33 + 1 + 72 = 363</code> weight units. Thus, given the same fee rate in BTC per weight unit, it will be cheaper to spend from a P2SH-P2WPKH output than it is to spend from a P2PKH output.</p>

<hr>

<blockquote>
  <p>He said <code>less efficient</code>. I want to know how much? Transaction size will be smaller than normal...?</p>
</blockquote>

<p>P2SH-P2WPKH (P2SH nested segwit) is not less efficient than P2PKH (non-segwit). It is less efficient than P2WPKH (native segwit).</p>

CC BY-SA 3.0
2018-01-14T01:08:47.827Z
2018-01-14T01:08:47.827Z
Ava Chow
<p>How much transaction fee will Segwit embedded inside P2SH save fee compared to P2PKH?</p>

<hr>

<p>Update 1</p>

<p>I found a similar question. </p>

<blockquote>
  <p>or they can be nested in a legacy P2SH 3... address which are backwards-compatible (although less efficient)</p>
</blockquote>

<p>He said <code>less efficient</code>. I want to know how much? Transaction size will be smaller than normal...?</p>

<p><a href="https://bitcoin.stackexchange.com/questions/62053/how-do-transaction-costs-compare-between-bech32-addresses-and-legacy-bitcoin-add">How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?</a></p>

<hr>

<p>Update 2</p>

<p>I found another one. I'm reading it.</p>

<p><a href="https://bitcoin.stackexchange.com/questions/67680/segwit-transaction-fee-byte">SegWit transaction fee/byte</a></p>

<hr>

<p>Update 3</p>

<p>The following page describes block weight. P2SH is used in the example. I think P2SH-wrapped segwit addresses has benefit for cheaper transaction.</p>

<p>Block weight</p>

<p><a href="https://en.bitcoin.it/wiki/Block_weight" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Block_weight</a></p>

<p>Someone posted the following table. I don't know if it is correct or not. But seems segwit(p2sh) has benefit than I expected.</p>

<p>Quick table. Sizes in bytes (virtual bytes for segwit, including the segwit discount)</p>

<p><a href="https://i.sstatic.net/hsXLD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hsXLD.png" alt="enter image description here"></a></p>

<p>How do I calculate my fees for a transaction sent from a Segwit address?</p>

<p><a href="https://www.reddit.com/r/Bitcoin/comments/7m8ald/how_do_i_calculate_my_fees_for_a_transaction_sent/" rel="nofollow noreferrer">https://www.reddit.com/r/Bitcoin/comments/7m8ald/how_do_i_calculate_my_fees_for_a_transaction_sent/</a></p>

<transaction-fees><segregated-witness><transaction-weight>
Will Segwit embedded inside P2SH save fee compared to P2PKH?
zono
# Will Segwit embedded inside P2SH save fee compared to P2PKH?

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

How much transaction fee will Segwit embedded inside P2SH save fee compared to P2PKH?

---

Update 1

I found a similar question.

> or they can be nested in a legacy P2SH 3... address which are backwards-compatible (although less efficient)

He said `less efficient`. I want to know how much? Transaction size will be smaller than normal...?

[How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?](https://bitcoin.stackexchange.com/questions/62053/how-do-transaction-costs-compare-between-bech32-addresses-and-legacy-bitcoin-add)

---

Update 2

I found another one. I'm reading it.

[SegWit transaction fee/byte](https://bitcoin.stackexchange.com/questions/67680/segwit-transaction-fee-byte)

---

Update 3

The following page describes block weight. P2SH is used in the example. I think P2SH-wrapped segwit addresses has benefit for cheaper transaction.

Block weight

<https://en.bitcoin.it/wiki/Block_weight>

Someone posted the following table. I don't know if it is correct or not. But seems segwit(p2sh) has benefit than I expected.

Quick table. Sizes in bytes (virtual bytes for segwit, including the segwit discount)

[![enter image description here](https://i.sstatic.net/hsXLD.png)](https://i.sstatic.net/hsXLD.png)

How do I calculate my fees for a transaction sent from a Segwit address?

<https://www.reddit.com/r/Bitcoin/comments/7m8ald/how_do_i_calculate_my_fees_for_a_transaction_sent/>

**Tags:** transaction-fees, segregated-witness, transaction-weight


---

## 1 answers

### Answer by username_1 on 2018-01-14. Score: 3

Spending a P2PKH output in an input of a transaction requires `4 * (36 + 1 + 1 + 33 + 1 + 72 + 4) = 592` weight units. Spending a P2SH-P2WPKH in an input of a transaction requires `4 * (36 + 1 + 1 + 22 + 4) + 1 + 33 + 1 + 72 = 363` weight units. Thus, given the same fee rate in BTC per weight unit, it will be cheaper to spend from a P2SH-P2WPKH output than it is to spend from a P2PKH output.

---

> He said `less efficient`. I want to know how much? Transaction size will be smaller than normal...?

P2SH-P2WPKH (P2SH nested segwit) is not less efficient than P2PKH (non-segwit). It is less efficient than P2WPKH (native segwit).


---

