Virtual bytes (vB)
Virtual bytes are transaction weight divided by four, the unit fee rates are quoted in.
A virtual byte (vB) is a quarter of a weight unit. A transaction’s virtual size is its weight divided by four, rounded up, and it is the size that fee rates are applied to. For a transaction with no witness data, virtual size equals its length in bytes.
How it works
BIP141 defines weight as base size times three plus total size, where base size excludes witness data and total size includes it. Put another way, each non-witness byte counts as 4 weight units and each witness byte as 1. Dividing weight by 4 gives the virtual size.
A made-up example: a transaction with 110 bytes outside the witness and 70 bytes of witness data has a total size of 180 bytes. Its weight is 110 x 3 + 180 = 510, and its virtual size is 510 / 4 = 127.5, rounded up to 128 vB. At 10 sat/vB it would pay 1,280 satoshis.
Where you see it
Virtual size appears wherever fees are shown. Wallets show it as the transaction size, explorers list vsize beside weight, and node software reports mempool totals in virtual bytes. One block can hold at most 1,000,000 vB, since the limit is 4,000,000 weight units, as defined in Bitcoin Core’s consensus constants.
It is the reason SegWit-style inputs cost less than legacy inputs of the same function. Their signature data sits in the witness and is counted at one unit per byte. The derivation is in the guide on fee rates, virtual bytes and weight.
Common confusions
- Same as bytes. Only for transactions with no witness data. Otherwise vB is smaller.
- Same as weight. Weight is four times larger numerically. 1 vB is 4 WU.
- Same as memory use. A node’s memory use for a transaction is larger than its virtual size because of bookkeeping overhead.
The related entries are block weight and fee rate. The topic belongs to the network hub. This entry is not financial advice.
Sources
- BIP141: Segregated Witness (consensus layer) · Bitcoin Improvement Proposals
- Bitcoin Core consensus.h · Bitcoin Core
Educational data only. Not financial, investment or tax advice; no licence is claimed. Bitcoin Prime publishes no forecasts, targets or trading signals.