First of all, this refers to

I want to estimate the TX-Fee I would have to pay in a simple scenario where my wallet contains only 1 address Z that has received X payments.

I then want to pay all the wallets balance to Y different addresses at once.

Because I want to spent all of its balance, it would be great to know the transaction-fee, so that I can reduce Y, or pay the fee to Z in advance.

Since I prefer a worst-case-calculation, is it legit to count every incoming payment to my address as Input?

Is the following calculation correct?

normal_fee := 0.0005                            // Taken from Bitcoin-QT
size := X * 148 + Y * 34 + 10 +- X
fee := normal_fee / (1 - size / 500kB)
  • 2
    It would be awesome if a client told you how long you will have to wait (or how much to increase the transaction) to eliminate the fee.
    – Brian Low
    Commented May 31, 2013 at 5:50
  • 1
    Most clients are better about it now. There is also now CoinTape.com which gives a per-byte estimate. Commented Oct 8, 2015 at 11:11

1 Answer 1



  1. A fee may not be required at all, if the priority of the transaction is high enough. Generally 1 BTC, one day old, is enough age and balance that you can send without a fee.

  2. If any of the individual payments are below 0.01 BTC, a minimum fee will always be required.

  3. The minimum fee, when required, is 0.0005 BTC per 1000 bytes of total transaction.

  4. The contribution of each input and each output to the total size is somewhat consistent, it only varies largely if there are compressed keys (standard for newly generated addresses on a recent client version), some examples:

A) 1 input/1 output (sending exact balance of one input) = 191 bytes B) 1 input/2 output (sending money from single input with some change) = 258 bytes C) 2 input/1 output (consolidating two address balances to one output) = 404 bytes D) 12 input/2 output (sending from many inputs with change) = 1851 bytes

The easiest way to empty a wallet is to attempt to spend the entire balance with the transaction you desire, attempt to send it, and look at the "exceeds your balance after a 0.0xxx fee is included" message. Subtract the fee from the amount you are sending, and you should now be sending the entire wallet balance including the fee.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.