<p>You can use <code>bitcoin-cli</code> <a href="https://bitcoin.org/en/developer-reference#estimatefee" rel="nofollow noreferrer">estimatefee</a> to estimate the fees required, and <a href="https://bitcoin.org/en/developer-reference#settxfee" rel="nofollow noreferrer">settxfee</a> to set it.  It's usually a bit trickier on the command line, a GUI wallet should show this information before you make the transaction though.</p>

CC BY-SA 3.0
2017-06-10T23:46:43.843Z
To be specific, if you use Bitcoin Core in the GUI mode, it shows you the fee rate before pressing send and the exact amount of fee in a confirmation window.
Murch
CC BY-SA 3.0
2017-06-09T12:45:11.663Z
2017-06-09T12:45:11.663Z
Daniel Morritt
<p>I tried to send 0.001 BTC with Bitcoin-Core, but for some reasons it charged me with a transaction fee of 0.00145271 BTC:</p>

<pre><code>$ bitcoin-cli getinfo|grep balance
"balance": 0.03312022,
$ bitcoin-cli sendtoaddress my_bitcoin_address 0.001
$ bitcoin-cli getinfo|grep balance
"balance": 0.03066751,
</code></pre>

<p>Is there any way to know which fee am I going to pay <strong>before</strong> sending the transaction?</p>

CC BY-SA 3.0
2017-06-09T12:43:16.550Z
Possible duplicate of [How to calculate transaction size before sending](https://bitcoin.stackexchange.com/questions/1195/how-to-calculate-transaction-size-before-sending)
sr_gi
CC BY-SA 3.0
2017-06-09T14:59:36.010Z
Note that fees are not paid relative to the amount of value transferred but respective to the data size of the transaction. This causes small transfers to be expensive relatively.
Murch
<bitcoind><transaction-fees>
How is the Bitcoin transaction fee calculated for small transactions
vdudouyt
# How is the Bitcoin transaction fee calculated for small transactions

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

I tried to send 0.001 BTC with Bitcoin-Core, but for some reasons it charged me with a transaction fee of 0.00145271 BTC:
$ bitcoin-cli getinfo|grep balance
"balance": 0.03312022,
$ bitcoin-cli sendtoaddress my_bitcoin_address 0.001
$ bitcoin-cli getinfo|grep balance
"balance": 0.03066751,

Is there any way to know which fee am I going to pay before sending the transaction?

**Tags:** bitcoind, transaction-fees

> **Comments:**
> **username_1**: Possible duplicate of [How to calculate transaction size before sending](https://bitcoin.stackexchange.com/questions/1195/how-to-calculate-transaction-size-before-sending)  
> **username_2**: Note that fees are not paid relative to the amount of value transferred but respective to the data size of the transaction. This causes small transfers to be expensive relatively.  

---

## 1 answers

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

You can use `bitcoin-cli` [estimatefee](https://bitcoin.org/en/developer-reference#estimatefee) to estimate the fees required, and [settxfee](https://bitcoin.org/en/developer-reference#settxfee) to set it. It's usually a bit trickier on the command line, a GUI wallet should show this information before you make the transaction though.

> **Comments:**
> **username_2**: To be specific, if you use Bitcoin Core in the GUI mode, it shows you the fee rate before pressing send and the exact amount of fee in a confirmation window.  

---

