<p><code>estimatefee 1</code> will return the approx. fee per <strong>kilobyte</strong>.</p>

<p>Because <code>sendtoaddress</code> could use multiple of your unspent coins, the size of your transaction is not know until it is created (until the coin selection ran). </p>

<p>Example: Fresh wallet. You did receive 10 times 1 BTC. Now you create a transaction with <code>sendtoaddress &lt;ard&gt; 9.5</code>. This will produce a transaction with 10 inputs (your received 10 x 1BTC). Therefor the transaction size is bigger than if you would have received 1 x 10BTC.</p>

<p>At the moment there is no easy way of getting the transaction fee before sending the tx (on RPC level). You could use Bitcoin-Qt (there you will see the fee before sending within the confirmation dialog).</p>

<p>There is a pull request for bitcoin-core that would allow fee calculation before sending the tx: <a href="https://github.com/bitcoin/bitcoin/pull/6088" rel="nofollow">https://github.com/bitcoin/bitcoin/pull/6088</a></p>

CC BY-SA 3.0
2015-06-18T15:57:57.253Z
The pull request will provide a great functionality that is missing today from the RPC API, nice work!
Doug Peters
CC BY-SA 3.0
2015-06-17T07:50:04.387Z
2015-06-17T07:50:04.387Z
Jonas Schnelli
<p>When I call <code>estimatefee 1</code> in testnet it returns: 0.00044444</p>

<p>Then when I call <code>sendtoaddress xxxxxx 0,1</code> (which got the first confirmation within a couple of minutes after sending) I see that the fee included is: 0.00001662 BTC, which is about 27 times smaller that the original estimate.</p>

<p>What am I missing?</p>

<json-rpc><transaction-fees><bitcoin-core>
Estimatefee value not corresponding to actual fee
Doug Peters
# Estimatefee value not corresponding to actual fee

(Asked by: username_0 on 2015-06-15)

When I call `estimatefee 1` in testnet it returns: 0.00044444

Then when I call `sendtoaddress xxxxxx 0,1` (which got the first confirmation within a couple of minutes after sending) I see that the fee included is: 0.00001662 BTC, which is about 27 times smaller that the original estimate.

What am I missing?

**Tags:** json-rpc, transaction-fees, bitcoin-core


---

## 1 answers

### Answer by username_1 on 2015-06-17. Score: 1

`estimatefee 1` will return the approx. fee per **kilobyte**.

Because `sendtoaddress` could use multiple of your unspent coins, the size of your transaction is not know until it is created (until the coin selection ran).

Example: Fresh wallet. You did receive 10 times 1 BTC. Now you create a transaction with `sendtoaddress <ard> 9.5`. This will produce a transaction with 10 inputs (your received 10 x 1BTC). Therefor the transaction size is bigger than if you would have received 1 x 10BTC.

At the moment there is no easy way of getting the transaction fee before sending the tx (on RPC level). You could use Bitcoin-Qt (there you will see the fee before sending within the confirmation dialog).

There is a pull request for bitcoin-core that would allow fee calculation before sending the tx: <https://github.com/bitcoin/bitcoin/pull/6088>

> **Comments:**
> **username_0**: The pull request will provide a great functionality that is missing today from the RPC API, nice work!  

---

