<p>If your hex string looks something like "12abcd" then it uses two hex characters per byte.  Just take the length of the hex string, divide it by two to get the number of bytes in the transaction, and then divide by 1024 to get the number of KiB.</p>

CC BY-SA 3.0
2014-04-23T21:20:06.857Z
2014-04-23T21:20:06.857Z
David Grayson
<p>How to calculate transaction size from its hex-encoded representation, so i can include transaction fees per kb ?</p>

CC BY-SA 3.0
2014-04-24T10:15:29.827Z
I am creating simple transactions, 1 input and 1 output, based on George formula is lesser than 200 bytes. Could i set a fee lesser than mintxfee=0.1 mBTC without increasing confirmation time?
Riccardo Casatta
CC BY-SA 3.0
2015-06-19T14:55:16.367Z
@Farghaly, could you clarify exactly what type of transaction you are talking about?  How did you obtain it, and does it include signatures yet?  Are you interested in its current size, or the size it will be later after it is fully signed and ready to go on the block chain?
David Grayson
<transactions>
Is it possible to calculate TX size from its hex?
Farghaly
# Is it possible to calculate TX size from its hex?

(Asked by: username_0 on 2014-04-23)

How to calculate transaction size from its hex-encoded representation, so i can include transaction fees per kb ?

**Tags:** transactions

> **Comments:**
> **username_1**: I am creating simple transactions, 1 input and 1 output, based on George formula is lesser than 200 bytes. Could i set a fee lesser than mintxfee=0.1 mBTC without increasing confirmation time?  
> **username_2**: @username_0, could you clarify exactly what type of transaction you are talking about?  How did you obtain it, and does it include signatures yet?  Are you interested in its current size, or the size it will be later after it is fully signed and ready to go on the block chain?  

---

## 1 answers

### Answer by username_2 on 2014-04-23. Score: 2

If your hex string looks something like "12abcd" then it uses two hex characters per byte. Just take the length of the hex string, divide it by two to get the number of bytes in the transaction, and then divide by 1024 to get the number of KiB.


---

