Author

Topic: How to calculate size of transaction? (Read 556 times)

hero member
Activity: 656
Merit: 501
XBY - New Tech Coin (POSIGN) xtrabytes.global
February 08, 2017, 07:48:23 AM
#4
Thank you for info.
legendary
Activity: 3472
Merit: 4801
February 08, 2017, 07:40:26 AM
#3
you can make an estimation this way:

in*180 + out*34 + 10 plus or minus 'in'*

* source: http://bitcoin.stackexchange.com/questions/1195/how-to-calculate-transaction-size-before-sending

That information is old and no longer accurate.

Most modern wallets and services use compressed key addresses.  If you received the bitcoins at a compressed key address (which you probably did), then each input is between 147 and 149 bytes (not 180).

Outputs are still typically 34 bytes each (there may be a variation of a few bytes if you are not sending to a P2PKH address), and there is still 10 bytes of overhead per transactions.
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
February 08, 2017, 07:36:29 AM
#2
Hello,

I know it is very important how big is transaction. I mean size of it. Generally if it comes from 1 to 2 inputs it is about 370 bytes.
Can you tell me is there any way to calculate how big will be transaction ?
We know more inputs, bigger size but we need to know how big fee we need to put.

Is there any way to calculate it ?
What is the maximum inputs transaction you ever saw ?

EDIT: Please read DannyHamilton's post (right beneith this one). Seems like my info is a bit on the old side (you learn something new every day Wink )


You can't really calculate it, but you can make an estimation this way:

in*180 + out*34 + 10 plus or minus 'in'*

* source: http://bitcoin.stackexchange.com/questions/1195/how-to-calculate-transaction-size-before-sending

This is valid for "standard" P2PKH transactions. Offcourse, it's still an estimation.

For example, a transaction with one input and two outputs (one output to the receiver, one output to your change address):

1*180+2*34+10 +/-1 = estimated size between 257 and 259 bytes.
https://bitcoinfees.21.co/ tells us that at time of writing 140 satoshi's per byte will give you a 90% chance of getting into one of the next 3 blocks.
Personally, i don't mind waiting 3 hours, so i'd go for a 61-80 satoshi/byte fee... 259 * 61 =~ a 0.00016 BTC fee would probably be enough if you don't mind waiting for a couple of hours.
hero member
Activity: 656
Merit: 501
XBY - New Tech Coin (POSIGN) xtrabytes.global
February 08, 2017, 07:32:52 AM
#1
Hello,

I know it is very important how big is transaction. I mean size of it. Generally if it comes from 1 to 2 inputs it is about 370 bytes.
Can you tell me is there any way to calculate how big will be transaction ?
We know more inputs, bigger size but we need to know how big fee we need to put.

Is there any way to calculate it ?
What is the maximum inputs transaction you ever saw ?
Jump to: