<p>price_per_byte is the key that effect transaction cost for user. Generally standard fees for price_per_byte = 206 satoshi per byte which is too costly and higher for user, we can reduce it upto 2 satoshi. it will cost very low.</p>

<p>206 satoshi per byte transaction completes in very next block or in very next transaction means immediately. while 2 satoshi per kb transaction takes upto 2 to 3 hours to complete transaction.</p>

<p>general transaction space will be 224 to 299 kb if user send BTC to single user amount is not the matter here, so transaction cost will be very low based how much satoshi amount user has setup for transaction.</p>

CC BY-SA 4.0
2018-07-02T12:17:59.653Z
`general transaction space will be 224 to 299 kb` It should be bytes, not kb.
Raghav Sood
CC BY-SA 4.0
2018-07-02T11:17:51.633Z
2018-07-02T11:17:51.633Z
Rushabh Madhu
<p>generally you can calculate the fees based on this formula:</p>

<p>fee = (n_inputs * 148 + n_outputs * 34 + 10) * price_per_byte</p>

<p>So you would have to know how many inputs are necessary for your transaction, and usually you have two outputs. To further understand these details, one would have to have a look at how transactions are set up in the ecosystem (bitcoin.org -> developper section is a good start). </p>

<p>Assuming you have one input, and two outputs, this sums up to ~350 Bytes, multiplied with 35 Satoshi per Byte would a near value of your picture. So there is a value slightly less than 35 Satoshi per bytes chosen. </p>

CC BY-SA 3.0
2017-11-09T10:35:10.593Z
this formula is very obsolete. it does not care about compressed/uncompressed public keys, it counts only p2pkh inputs and outputs, it knows nothing about segwit technology, multisig and all other protocol things
amaclin
CC BY-SA 4.0
2020-08-06T22:19:46.047Z
@amaclin Can you expand on how fees ought to be calculated when dealing w/ multisig, segwit, et all.
Albert Renshaw
CC BY-SA 3.0
2017-11-09T09:42:38.940Z
2017-11-09T09:42:38.940Z
pebwindkraft
<ol>
<li>How does the client (on screenshot) calculates fees?</li>
</ol>

<p>or </p>

<ol start="2">
<li>How to calculate fees in your own environment?</li>
</ol>

<p>a1) Depends on client</p>

<p>a2) There are many ways. For example, you can make the transaction twice: first time create and sign it with zero fees, take the size in bytes and multiply by the rate you want to. Next create final transaction with wanted satoshi-per-byte fee.</p>

CC BY-SA 3.0
2017-11-09T07:45:29.007Z
2017-11-09T08:07:49.493Z
2017-11-09T08:07:49.493Z
amaclin
<p><a href="https://i.sstatic.net/NTcvl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NTcvl.png" alt="enter image description here" /></a></p>
<p>How were the transaction fees of 0.00011689 BTC calculated?</p>

<transaction-fees>
How to calculate the bitcoin tx fees?
cherrish
# How to calculate the bitcoin tx fees?

(Asked by: username_0 on 2017-11-09)

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

How were the transaction fees of 0.00011689 BTC calculated?

**Tags:** transaction-fees


---

## 3 answers

### Answer by username_1 on 2018-07-02. Score: 3

price\_per\_byte is the key that effect transaction cost for user. Generally standard fees for price\_per\_byte = 206 satoshi per byte which is too costly and higher for user, we can reduce it upto 2 satoshi. it will cost very low.

206 satoshi per byte transaction completes in very next block or in very next transaction means immediately. while 2 satoshi per kb transaction takes upto 2 to 3 hours to complete transaction.

general transaction space will be 224 to 299 kb if user send BTC to single user amount is not the matter here, so transaction cost will be very low based how much satoshi amount user has setup for transaction.

> **Comments:**
> **username_2**: `general transaction space will be 224 to 299 kb` It should be bytes, not kb.  

---

### Answer by username_3 on 2017-11-09. Score: 2

generally you can calculate the fees based on this formula:

fee = (n\_inputs \* 148 + n\_outputs \* 34 + 10) \* price\_per\_byte

So you would have to know how many inputs are necessary for your transaction, and usually you have two outputs. To further understand these details, one would have to have a look at how transactions are set up in the ecosystem (bitcoin.org -> developper section is a good start).

Assuming you have one input, and two outputs, this sums up to ~350 Bytes, multiplied with 35 Satoshi per Byte would a near value of your picture. So there is a value slightly less than 35 Satoshi per bytes chosen.

> **Comments:**
> **username_4**: this formula is very obsolete. it does not care about compressed/uncompressed public keys, it counts only p2pkh inputs and outputs, it knows nothing about segwit technology, multisig and all other protocol things  
> **username_5**: @username_4 Can you expand on how fees ought to be calculated when dealing w/ multisig, segwit, et all.  

---

### Answer by username_4 on 2017-11-09. Score: 0

1. How does the client (on screenshot) calculates fees?

or

2. How to calculate fees in your own environment?

a1) Depends on client

a2) There are many ways. For example, you can make the transaction twice: first time create and sign it with zero fees, take the size in bytes and multiply by the rate you want to. Next create final transaction with wanted satoshi-per-byte fee.


---

