Skip to content
buybitcoinsmart

Glossary / Mining & consensus

Block weight

Definition
Block weight measures a bitcoin block on a scale where a byte of witness data costs 1 unit and every other byte costs 4, capped at 4,000,000 units.

Specified in BIP-141.

Weight exists because bytes are not all equally expensive to a node. Signature data can be discarded once a transaction is buried, so BIP141 priced it at a quarter of everything else and set the budget at 4,000,000 units per block. Your withdrawal competes for that budget, and the discount is why sending from a modern address costs less than sending from an old one.

How it works

The formula in BIP141 reads: weight equals base size multiplied by three, plus total size. Base size is the block serialized the old way, with witnesses stripped out; total size is the full serialization. Written the other way round, the same rule says four units per non witness byte and one unit per witness byte, which is the version worth memorising.

Divide weight by four and round up and you get virtual bytes, the unit every fee estimator and every wallet uses. A payment spending two inputs and creating two outputs, all of them native SegWit, comes to roughly 208 virtual bytes, or about 832 weight units. Fill a block with nothing else and you fit close to 4,800 of them. The same payment built from legacy pay to public key hash addresses measures about 374 bytes, which weighs 1,496 units because none of it qualifies for the discount, so only about 2,670 would fit.

That gap is the whole point of the design. Discounting witnesses made SegWit adoption pay for itself: a wallet that upgraded got smaller fees on every transaction, without anyone having to be persuaded that a larger block was safe. It also nudges behaviour in a direction the network wants, since spending old outputs and consolidating them into fresh ones is cheaper per input than it used to be.

Two details trip people up. Weight is calculated per transaction and then summed, so a block's weight is the sum of its transactions plus its header and counters, and a miner packing a block is solving a knapsack problem against the 4,000,000 unit budget rather than a byte count. And weight has no relationship to value: a 900 weight unit transaction moving 40 bitcoin and one moving 40,000 satoshis pay identical fees, because the network charges for space, never for amount.

Where you see it

Every block explorer prints weight next to size, and the Bitcoin Core RPC getblock returns weight, size, and strippedsize as three separate fields. Mempool visualisations are built on it too: the bars showing what is waiting to confirm are stacked by fee rate in sat/vB, which is weight divided by four in the denominator.

Weight is also what an exchange is really charging you for in a withdrawal fee. A platform quoting a flat fee in bitcoin is averaging over the weight of the transactions it expects to build, and it profits when the mempool is quiet and loses when it is busy. A platform that batches, sending dozens of customer withdrawals as outputs of a single transaction, pays for one set of inputs instead of dozens, which is why batching exchanges can afford much lower fees than the ones that broadcast every withdrawal separately.

Block weight vs virtual byte

Block weight is the raw measurement and a virtual byte is the same measurement divided by four. Both describe the same data; only the scale differs. Weight is the unit written into the consensus rules, so the 4,000,000 figure appears in code as a weight. Virtual bytes are the unit written into wallet interfaces, because a fee rate of 8 sat/vB is easier to reason about than 2 sat per weight unit. When a wallet says your transaction is 141 vbytes, the block it lands in has 564 units less room.

Not to be confused with

Frequently asked questions

How do I convert block weight to virtual bytes?

Divide the weight by four and round up. A transaction of 560 weight units is 140 virtual bytes, and a full block of 4,000,000 weight units is 1,000,000 virtual bytes.

Does a bigger bitcoin amount cost a bigger fee?

No. Fees are charged per unit of block weight, not per coin moved. A transaction sending a fraction of a bitcoin and one sending fifty can weigh the same and pay the same, as long as they have the same number of inputs and outputs.

Read next

Related terms

More in Mining & consensus