Home › Glossary › Virtual byte (vbyte)

Virtual byte (vbyte)

Also called: vbyte, vB, virtual size, vsize, sat/vB.

A virtual byte (vbyte, vB) is the unit of Bitcoin transaction size since SegWit: weight divided by four. Fee rates are quoted in sat/vB.

A virtual byte (vbyte, vB) measures how much block space a transaction uses. BIP 141 defines a transaction's virtual size as its weight divided by 4, rounded up. Fee rates are quoted in satoshis per vbyte (sat/vB), and that is what miners compare when choosing transactions.

How vbytes are calculated

Weight counts each non-witness byte as 4 weight units (WU) and each witness byte as 1 WU. Dividing by 4 means:

  • a byte of non-witness data costs 1 vB;
  • a byte of witness data (signatures, public keys, witness scripts) costs 0.25 vB.

For a transaction without witness data, vbytes and bytes are the same. For SegWit and Taproot spends the virtual size is smaller than the raw size. A transaction spending one P2WPKH input to two P2WPKH outputs, for example, is about 141 vB, although it takes roughly 222 bytes. A block may hold at most 4,000,000 WU, which is 1,000,000 vB.

Fees in vbytes

Fee = fee rate × virtual size. At 5 sat/vB, that 141 vB transaction costs 705 sats. Because witness bytes are discounted, spending SegWit outputs costs less than spending legacy P2PKH outputs with similar signatures. Mempool policy is measured in vbytes too: TRUC transactions (BIP 431) are capped at 10,000 vB, and their children at 1,000 vB.

Estimate the virtual size of any mix of inputs and outputs with the transaction size calculator, or convert fee amounts with the unit converter.

BIPs that define Virtual byte (vbyte)

Related terms

  • Block weight: Block weight is the SegWit-era measure of block size: non-witness bytes count 4 units and witness bytes 1, with a limit of 4,000,000 weight units.
  • Witness: The witness is the part of a SegWit transaction that holds signatures and scripts, kept out of the txid so it can't be changed to alter the transaction ID.
  • SegWit (Segregated Witness): SegWit (Segregated Witness) is the 2017 soft fork that moved signatures into a separate witness, fixing malleability and introducing block weight.
  • Satoshi (sat): A satoshi (sat) is the smallest unit of bitcoin: one hundred-millionth of a bitcoin, or 0.00000001 BTC. 1 BTC = 100,000,000 sats.

Learn more

Guides