Reviewed Aug 2026
DE
BA-05 · LESSON 04

Fees, weight, and vbytes

KEY DEFINITIONS

Terms used in this lesson

Virtual byte
A fee-accounting unit derived from Bitcoin transaction weight; fee rates are commonly quoted per virtual byte.
Witness
Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
SegWit
Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
Proof-of-work target
The maximum header-hash value accepted for a block; lowering it makes valid hashes harder to find.

Fees equal inputs minus outputs, while feerates use virtual size derived from transaction weight.

65 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

A transaction fee is input value minus output value. Transaction weight charges non-witness bytes four weight units and witness bytes one weight unit. Virtual size, or vbytes, is weight divided by four and rounded up. Feerate is fee divided by virtual size, commonly measured in satoshis per vbyte.

GUIDED EXPLANATION1/5 ideas inspected
1

Calculate base and total size

Base size is the serialization without SegWit marker, flag, or witness. Total size includes the complete serialized transaction.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionA 200-byte transaction always costs exactly twice as much as a 100-byte transaction.

Cost depends on weight composition and chosen feerate. Witness and non-witness bytes contribute different weight.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.