Skip to content
A global perspective on digital assetsGLOBAL PERSPECTIVE · LOCAL CONTEXT
ChainView BTC866CHAIN VIEW
Blockchain

Bitcoin Transaction Weight and Virtual Size

Bitcoin fees depend on transaction structure and fee rate rather than the fiat value sent.

Read inEnglish简体中文繁體中文한국어РусскийالعربيةEspañol (México)Tiếng Việtไทย
Bitcoin Transaction Weight and Virtual Size

Original topic illustration: ChainView BTC866 original topic diagram · ChainView BTC866 Editorial · CC BY 4.0

Value is not data size

Bitcoin fees depend on transaction structure and fee rate rather than the fiat value sent. Equal payments can use different inputs and outputs, so a fixed fee based only on payment value is misleading.

Changing the amount without changing the input-output structure need not change size proportionally. Conversely, a small payment requiring many inputs may cost more than a larger single-input payment. This contrast corrects the intuition that sending more necessarily means a larger network fee, without promoting a particular wallet or product.

Bitcoin transaction fees relate to the transaction's data footprint and fee rate rather than the fiat value being transferred.

Distinguish weight and virtual size

Segregated Witness assigns different weight treatment to witness and non-witness data. Virtual size converts weight into virtual bytes with rounding. Bytes, virtual bytes and weight units must not be silently interchanged.

Weight-to-vsize conversion includes rounding. Calculate using the protocol definition before comparing a tool's display. A satoshis-per-virtual-byte rate must be multiplied by the correct size to obtain the total, then converted separately to fiat. Do not place a rate and a total fee on one unlabeled axis as equivalent quantities.

Segregated Witness defines transaction weight with different treatment of witness and non-witness data; virtual size rounds weight into virtual bytes.

Inspect the input structure

Many small UTXOs can require more inputs, and script types change the data footprint. Output count and change also matter. Estimate the concrete transaction rather than inferring its size from a wallet balance.

Different scripts and signing arrangements can change witness size even with the same input count. Avoid applying one fixed input-size estimate to every type. If a tool supplies only a forecast, disclose the assumed structure, and retain a version note when an updated template makes an earlier estimate obsolete.

Input types, input count and output structure change weight, so two transfers of equal value can require different fees.

Compare estimates with signed size

A wallet can estimate a future signing structure, while the final signed transaction gives a firmer size check. Fee-rate recommendations have a timestamp and confirmation target; they do not guarantee inclusion in the next block.

A difference between unsigned estimate and signed result is not automatically a hidden charge; first inspect changed structure. An exchange withdrawal fee can follow a separate schedule and is not identical to the miner fee. Compare the venue's terms, actual transaction and wallet estimate as distinct records rather than one ambiguous number.

Compare fee-rate units carefully and use the final signed transaction size when reviewing estimates; a fee-rate recommendation is not a confirmation guarantee.

Learn without broadcasting

A hypothetical structure table can track inputs, outputs, witness, weight, virtual size and fee. Change one component at a time without revealing real holdings or sending funds. Check tool documentation whenever the displayed fee unit is unclear.

Add input value and change to the teaching table, checking that fee equals inputs minus outputs. Even a small real exercise costs money, so local unbroadcast analysis is preferable for learning structure. Any online calculator requesting a seed phrase or full private key should be rejected as a fee-estimation route.

A second teaching example can hold the payment value fixed while changing input script type. Compare the resulting weight and virtual size, keeping the rate constant. Then hold structure fixed and vary the rate. Separating those experiments makes it clear which part of the total came from data footprint and which came from pricing. It also prevents a rising fiat exchange rate from being mistaken for a change in the transaction's underlying byte structure.

The implementation checklist for this mechanism should separate input structure, witness, weight and virtual bytes. For each item, distinguish the specification, software behaviour and the observation actually obtained. Start with a narrow read-only example that has no valuable assets at risk, preserving versions and block references. Missing evidence limits the conclusion instead of proving the entire protocol failed. When clients disagree, compare configuration and data coverage before choosing a result. Explain enough of the boundary that a reader can identify what remains trusted. Technical terminology, open code and a successful small demonstration are useful evidence, but none independently certifies a production system.

Sources

  1. BIP 141 segregated witness (opens in a new tab)
  2. Bitcoin developer transaction guide (opens in a new tab)