Sometimes when I'm sending a transaction using json-rpc calls to bitcoind, the client adds more than 0.0001 fee. 0.0001 is the TX fee I specified in the settings.

My understanding is that when the TX size is larger than a certain KB, client automatically adds more fee. Is this true?

If so, how can I calculate how much fee a transaction will require before I send it?

1 Answer 1


Yes, an additional fee is added for each 1000 bytes in the transaction. You can get a rough estimate of the transaction size using this formula:

148*IN + 34*OUT + 10

where IN is the number of inputs and OUT is the number of outputs. The result can vary by IN bytes since a leading zero is prefixed to keys where the first byte is 0x80-0xFF. This assumes the transaction is using compressed public keys (bitcoin addresses).

So, for the minimal fee, you need to keep the transaction size under 1000 bytes. Assuming two outputs (the recipient and change), you can have up to 6 inputs without incurring an additional 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.