Is Bitcoin Transaction Size the Same as Virtual Size?
Not always. A Bitcoin transaction's raw serialized byte length and its virtual size (vsize) can differ because witness bytes receive a lower weight under SegWit.
How is vsize calculated?
Weight = stripped size × 4 + (total size − stripped size). Virtual size = ceiling(weight / 4). For transactions with no witness serialization, vsize equals the serialized byte size.
Example
A transaction with 120 stripped bytes and 230 total bytes has weight 590 WU and vsize 148 vB. At 5 sat/vB, 740 sat is the corresponding fee.
Why does this matter?
Wallets generally estimate fees using virtual size, not just the raw transaction byte length. Actual fees depend on the final signed transaction and prevailing mempool and mining conditions.
Primary references
Bitcoin Developer Reference — Transactions: https://developer.bitcoin.org/reference/transactions.html
BIP141 — Segregated Witness: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki
BIP144 — Segregated Witness Peer Services: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki
