i have read : How to calculate transaction size before sending

but i will not understand what are in and out. as describe in this link in=40 and out=16

what does it mean???

i will send only one address to 0.20BTC of 1BTC account. please describe this transaction size.

  • This question is pretty hard to understand languagewise, could somebody that understood its intent please improve it and properly tag it?
    – Murch
    Commented Jun 3, 2015 at 12:47

2 Answers 2


In the simplest typical case, you'll have one input and two outputs (the recipient, and change). So in=1 and out=2. According to the linked formula, the transaction size will be about 160+2*34+10 = 258 bytes. It does not depend on how many bitcoins you are sending.

However, if the money you are sending came from many different sources, you will have many inputs and the transaction will be bigger. Again, this does not depend on the amount of money, but on the complexity of your wallet's history.

  • in =1times = .2btc **out**=2times = 0.8btc and 0.2btc . is it right?? what is my transaction fee for that??? sorry for disturbing you.. thank you Commented Jun 10, 2015 at 6:07
  • Usually a fee of 0.0001 bitcoin will get your transaction confirmed quickly. Commented Jun 10, 2015 at 17:53
  • i transaction many type of amount. but a amount .0002BTC i do transaction many times, it fees as 0.00012568, 0.00015528 BTC, 0.00012096 BTC. how can i calculate this value??? Commented Jun 11, 2015 at 5:29
  • @ShahadatHossain: I don't know. Commented Jun 11, 2015 at 11:28

Usually, you want to do this to estimate a fee before sending a transaction. Transaction fees are way more complicated than they probably should be. I'll stick to calculating the transaction size here, but keep in mind there's more to the picture when talking about fees.

in is the number of inputs, and out is the number of outputs. If you haven't seen this discussed before, here's a crash course.

Using a block explorer you may have noticed that some transactions use multiple inputs, even though only one address is spent from. For example:


Bitcoin is an "electronic cash system". Understanding this concept is probably the most important thing you can do as a Bitcoin user. Unfortunately, it's the part that most beginning users skip.

Rather than physical tokens like metal coins and paper banknotes, Bitcoin uses electronic tokens. There's more here: Bitcoin: Think of It as Electronic Cash.

In Bitcoin, there's a useful relationship:

coin ≈ unspent output

Think of a transaction as a box. On the left are inputs. On the right are outputs. Each input links to the output of a previous transaction. An output can only be spent once, and it must be completely spent. An output with no later links to it can be spent, and is often referred to as an "unspent coin".

enter image description here

Each input in a simple Alice-Pays-Bob transaction contributes ~180 bytes, if you're using uncompressed public keys, and ~148 bytes if your public keys are compressed.

So, to estimate the size of the transaction in bytes, you need to know how many coins will be spent, and whether your public key is compressed or uncompressed.

Unfortunately, "consumer friendly" wallets won't show you your coins. You'll have to use a more advanced tool that supports "coin control" to do that. Bitcoin Core and Armory support coin control, as does Electrum to a limited extent.

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.