Bitcoin Forum
November 23, 2017, 06:32:32 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to calculate size of transaction?  (Read 357 times)
bikerleszno
Hero Member
*****
Offline Offline

Activity: 546


XBY - New Technology Coin (Virtual Chord Network)


View Profile WWW
February 08, 2017, 12:32:52 PM
 #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 ?

XBY - New Technology Coin (Virtual Chord Network) - https://xtrabytes.global
Slack Channel - https://xtrabytes-xby.herokuapp.com
Telegram Group - https://t.me/xtrabytes_official
1511418752
Hero Member
*
Offline Offline

Posts: 1511418752

View Profile Personal Message (Offline)

Ignore
1511418752
Reply with quote  #2

1511418752
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511418752
Hero Member
*
Offline Offline

Posts: 1511418752

View Profile Personal Message (Offline)

Ignore
1511418752
Reply with quote  #2

1511418752
Report to moderator
mocacinno
Legendary
*
Online Online

Activity: 1050


http://www.mocacinno.com


View Profile WWW
February 08, 2017, 12:36:29 PM
 #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.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
February 08, 2017, 12:40:26 PM
 #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.

bikerleszno
Hero Member
*****
Offline Offline

Activity: 546


XBY - New Technology Coin (Virtual Chord Network)


View Profile WWW
February 08, 2017, 12:48:23 PM
 #4

Thank you for info.

XBY - New Technology Coin (Virtual Chord Network) - https://xtrabytes.global
Slack Channel - https://xtrabytes-xby.herokuapp.com
Telegram Group - https://t.me/xtrabytes_official
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!