Author

Topic: Why every transaction has different size even you are sending same amount of BTC (Read 506 times)

hero member
Activity: 756
Merit: 503
Crypto.games
Reason is that bigger the number of inputs, or what I call internal transactions, bigger the size will be, because there's more thing for miners to verify.

I also want to know this. I don't understand codes, so, is there an average number for inputs and outputs? Like for example:

Inputs= 100bytes ; Outputs=50bytes then if there was 4 Inputs and 3 Outputs it would be
4x100 + 3x50 = 550(Estimated Transaction Size) give or take a few.

Any ideas?

roughly 148*in + 34*out(+-10) so more around the 694-704 mark
EDIT: just found
https://blockchain.info/tx/9ad969d73f4859f05564682f88ba28451d3609efc808ae100876457fd725e539
702... Cheesy

it gets more complicated if multisig addresses and scripted addresses are involved, so alot of people still prefer
roughly 180*in + 34*out due to multisig/scripts, but even this is not good.

the "148*in +34*out" (+-10) is usually if your only paying from and to normal addresses.. which will soon become less common after segwit/ln is running.


Thank you franky. Finally an answer "I can wrap my head around".  Grin Grin
I've actually been looking and asking for the past week, (ever since I moved to desktops) and have been risking the "condescension" from "expert" users who'd deign to reply.
So, thanks for the straight answer. (bookmarked for reference)
legendary
Activity: 4410
Merit: 4766
Reason is that bigger the number of inputs, or what I call internal transactions, bigger the size will be, because there's more thing for miners to verify.

I also want to know this. I don't understand codes, so, is there an average number for inputs and outputs? Like for example:

Inputs= 100bytes ; Outputs=50bytes then if there was 4 Inputs and 3 Outputs it would be
4x100 + 3x50 = 550(Estimated Transaction Size) give or take a few.

Any ideas?

roughly 148*in + 34*out(+-10) so more around the 694-704 mark
EDIT: just found
https://blockchain.info/tx/9ad969d73f4859f05564682f88ba28451d3609efc808ae100876457fd725e539
702... Cheesy

it gets more complicated if multisig addresses and scripted addresses are involved,

the "148*in +34*out" (+-10) is usually if your only paying from and to normal addresses.. which will soon become less common after segwit/ln is running.
legendary
Activity: 4410
Merit: 4766
in short, without techno-waffled

TX1.
came from one source going to 2 destinations

TX2.
came from one source, going to 9 destinations

if you were hand-writing cheques or delivery notes or anything in the real world
the more source locations or destination locations you have to write... the more you have to write
hero member
Activity: 756
Merit: 503
Crypto.games
Reason is that bigger the number of inputs, or what I call internal transactions, bigger the size will be, because there's more thing for miners to verify.

I also want to know this. I don't understand codes, so, is there an average number for inputs and outputs? Like for example:

Inputs= 100bytes ; Outputs=50bytes then if there was 4 Inputs and 3 Outputs it would be
4x100 + 3x50 = 550(Estimated Transaction Size) give or take a few.

Any ideas?
hero member
Activity: 1106
Merit: 521
Guys can you explain because i'm confused about the transaction size its not always the same transaction when i was sending same amount of bitcoin to another wallet.. but the result is different size of transaction that can effect my transaction fee in electrum they are not the same fee i am paying fee almost $1 if my size of transaction hit 1kb.

Do you have some site that you can know the size of your bitcoin before you transact it to other wallet because paying high or large fee if the size is below than i expected i mean i want to know my bitcoin before i send it that i will know first the possible size will be and i will set the exact amount of fee so that it can be confirm next to block that i set..

Like this tranaction i just get it in blockchain randomly

https://blockchain.info/tx/e6230cb27924b84ff46414b4eb3068a07dbbe0ccec31b15c7846975ecab0a008

and this  one

https://blockchain.info/tx/f64d65dda45a418fad7eb79d183cb64e33f538f195c6aea4c652c20740c8236e

you can notice the size and the fee they transacted btc is small but high size and fee..

The simple answer is this:  say you are sending 1 BTC, well the transaction behind that 1 BTC (the transactions that make it up)  cause the size to vary, so if it that 1BTC had never been split from its creation then the size would be lower than say 1BTC that was made up from say, 10,000 faucet inputs.

Really basic explanation hope it helps you get your head around it.
sr. member
Activity: 379
Merit: 250
Reason is that bigger the number of inputs, or what I call internal transactions, bigger the size will be, because there's more thing for miners to verify.
hero member
Activity: 574
Merit: 503
V2h5IGFyZSB5b3UgcmVhZGluZyB0aGlzPw==
Bitcoin transaction size depends on the data of the transaction (inputs and outputs) and not the amount of bitcoin transacted.

Bitcoin transaction structure looks like this (this is the first transaction you posted)
Code:
{
   "lock_time":0,
   "size":225,
   "inputs":[
      {
         "prev_out":{
            "index":0,
            "hash":"e71ccbb5b8abd8d4ba545c90b995489f473a5fc3fed4786e7f790137d98c4790"
         },
         "script":"473044022079ca69eb2a4a6dc002026e7c228ffec4ed28bc2e2c3f36ff6fd2bd544feea28d0220435dc4cc189077a36c93bf2f54de7cf4866829bf12d80e51674a80b87f8375c701210271511ff7d2c3142950be15a914e9988b338d4f9dda5de22d6f1a47c795550e4d"
      }
   ],
   "version":1,
   "vin_sz":1,
   "hash":"e6230cb27924b84ff46414b4eb3068a07dbbe0ccec31b15c7846975ecab0a008",
   "vout_sz":2,
   "out":[
      {
         "script_string":"OP_DUP OP_HASH160 9e7e8811f21c9e82757b16cfbc9b570697b7a8af OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1FT3LsfpWH3gHxvtjJjjUxFKkmXaJG41kR",
         "value":5276500,
         "script":"76a9149e7e8811f21c9e82757b16cfbc9b570697b7a8af88ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 c87ba987900f1947dfafb352f3d89a531cfc40bf OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1KH4HZx4gSHtZaRCakaMMfMapVLipG9wej",
         "value":7000000,
         "script":"76a914c87ba987900f1947dfafb352f3d89a531cfc40bf88ac"
      }
   ]
}

From that, you can see that the transaction only have 1 input and 2 outputs. If you use an additional input you'll get a new input data that starts from {"prev_out" and ends with "script":"strings"}. It's more or less the same thing for outputs.
That's what make transactions bigger or smaller. The value is only few bits while the input/output data can take several bytes.

You can see how the second transaction you posted (and any other transaction) by decoding the raw transaction using this tool. Compare those transactions and you'll see the obvious difference.
hero member
Activity: 1456
Merit: 624
Maintain Social Distance, Stay safe.
Guys can you explain because i'm confused about the transaction size its not always the same transaction when i was sending same amount of bitcoin to another wallet.. but the result is different size of transaction that can effect my transaction fee in electrum they are not the same fee i am paying fee almost $1 if my size of transaction hit 1kb.

Do you have some site that you can know the size of your bitcoin before you transact it to other wallet because paying high or large fee if the size is below than i expected i mean i want to know my bitcoin before i send it that i will know first the possible size will be and i will set the exact amount of fee so that it can be confirm next to block that i set..

Like this tranaction i just get it in blockchain randomly

https://blockchain.info/tx/e6230cb27924b84ff46414b4eb3068a07dbbe0ccec31b15c7846975ecab0a008

and this  one

https://blockchain.info/tx/f64d65dda45a418fad7eb79d183cb64e33f538f195c6aea4c652c20740c8236e

you can notice the size and the fee they transacted btc is small but high size and fee..
Jump to: