Skip to content

Bitcoin Prime is a data desk, not a trading platform. We take no deposits.

Bitcoin Prime is an independent editorial data desk. It is not a trading platform, robot or investment service, takes no deposits, never asks for money or wallet keys, and is not affiliated with any product, app or scheme that uses the same or a similar name.

Bitcoin Prime
EN RU
BTC$60,326−4.23% 24h Block977,381 Next-block fee3 sat/vB Halving in72,619 blocks
Guide

Fee rates, virtual bytes and transaction weight

Weight becomes virtual bytes and then a fee, with the arithmetic shown step by step.

By the Bitcoin Prime desk · Published November 24, 2026 · updated November 24, 2026 · 7 min read

Bitcoin fees are quoted in satoshis per virtual byte (sat/vB), and a transaction’s fee is that rate multiplied by its size in virtual bytes. A virtual byte is a quarter of a weight unit, and weight is how the protocol measures a transaction against the 4,000,000-unit block limit. Once you know the weight formula, you can work out why some transactions cost far more than others.

Why there are three size units

Before SegWit, a transaction was one blob of bytes and a block had a limit of about one million bytes. Size, fee and limit all used the same unit. SegWit separated the signature data, called the witness, from the rest of the transaction, and the limit had to be redefined so that old and new nodes could agree on it.

The result is three related measures:

  • Size in bytes: the raw serialized length, with or without the witness.
  • Weight in weight units (WU): the number used by the consensus block limit.
  • Virtual size in virtual bytes (vB): weight divided by four, the unit in which fees are normally priced.

The unit on your wallet screen is almost always sat/vB, so that is the one to understand first.

The weight formula

BIP141 defines transaction weight as the base size multiplied by three, plus the total size. Base size is the transaction serialized without witness data. Total size is the transaction serialized with it.

That formula has a simple reading. Every byte outside the witness counts as 4 weight units. Every witness byte counts as 1. The virtual size is the weight divided by four, rounded up to a whole number.

QuantityFormulaConstant or note
Weightbase size x 3 + total sizeNon-witness byte = 4 WU, witness byte = 1 WU
Virtual sizeweight / 4, rounded up1 vB = 4 WU
Block limit4,000,000 WUEquals 1,000,000 vB
Feefee rate x virtual sizeRate in sat/vB gives a fee in satoshis

The block limit of 4,000,000 weight units, and the scale factor of 4, are defined in Bitcoin Core’s consensus constants. A transaction with no witness data has total size equal to base size, so its weight is exactly four times its byte length and its virtual size equals its byte length.

See the block weight and virtual bytes entries for short definitions.

What the witness discount is

People call the lower weight of witness bytes a discount. The effect is that data placed in the witness takes a quarter of the block space that the same number of non-witness bytes would. Signatures and public keys are the bulk of what lives there, so a transaction that carries most of its bytes as signatures gets a lower virtual size than its raw length suggests.

It is worth being precise about what this does and does not mean. The discount applies to how the protocol counts space, and fees follow that count. It does not make any individual transaction free, and it does not change the rule that miners prefer the highest fee per unit of space.

Where the bytes go: inputs, outputs and overhead

A transaction is a list of inputs, a list of outputs and a small amount of fixed overhead. Each input points to a previous output that is being spent. You can read more on that model in the entry for UTXO. The figures below are standard serialization arithmetic, and the signature lengths are approximate because ECDSA signatures vary by a byte.

Deriving the per-input cost

A spent output reference takes 41 bytes outside the witness: a 32-byte transaction id, a 4-byte output index, a 1-byte empty script length, and a 4-byte sequence. At 4 WU per byte that is 164 WU for every SegWit-style input before any witness data is added.

  • Native SegWit key input: the witness holds an item count, a signature of about 72 bytes with its length prefix, and a 33-byte compressed public key with its length prefix. That is about 108 bytes at 1 WU each, so the input totals about 272 WU, or 68 vB.
  • Taproot key-path input: the witness holds an item count and a single 64-byte Schnorr signature with its length prefix, about 66 bytes. The input totals about 230 WU, or 57.5 vB. The signature scheme is specified in BIP341.
  • Legacy key input: there is no witness. The unlocking script sits in the non-witness part and holds the signature and public key, so the input is about 148 bytes, which is 148 vB.

Outputs and overhead are counted the same way. A native SegWit key output is about 31 vB, a Taproot output about 43 vB, and a legacy key output about 34 vB. The fixed overhead of version, lock time and counts, plus the two SegWit marker bytes, comes to about 10.5 vB.

Treat all of these as approximate. Multisig, script-path Taproot spends, longer scripts and uncompressed keys all change the numbers, and a few tools round differently.

A worked fee calculation

Take a payment with one input and two outputs, one to the recipient and one back to yourself as change. Assume a fee rate of 12 sat/vB. The rate is a made-up illustration, not a current quote.

ShapeWeight (WU)Virtual sizeFee at 12 sat/vB
Legacy: 1 input, 2 outputsabout 904about 226 vBabout 2,712 sat
Native SegWit: 1 input, 2 outputsabout 562about 141 vBabout 1,692 sat
Taproot key path: 1 input, 2 outputs616154 vB1,848 sat

The native SegWit row is built from 42 WU of overhead, 272 WU for the input and 2 x 124 WU for the outputs, which sums to 562 WU. Dividing by four gives 140.5, rounded up to 141 vB. Multiplying by 12 gives 1,692 satoshis.

Notice that the Taproot row is larger than the native SegWit row here. Its input is smaller, but its outputs are larger, and with only one input the outputs dominate. The advantage of Taproot key-path spends shows up when the transaction has several inputs.

ShapeVirtual sizeFee at 12 sat/vB
Legacy: 10 inputs, 2 outputsabout 1,558 vBabout 18,696 sat
Native SegWit: 10 inputs, 2 outputsabout 753 vBabout 9,036 sat
Taproot key path: 10 inputs, 2 outputsabout 672 vBabout 8,064 sat

The amount being sent does not appear in either table. Only the structure matters. That is why a person who received a payment in many small pieces pays more to spend them than a person holding one large output.

Why SegWit and Taproot inputs cost less

The answer is the weight rule, applied to where the signature bytes live. A legacy input pushes about 107 bytes of unlocking data into the non-witness part, where each byte counts as 4 WU. A native SegWit input moves the equivalent data into the witness, where each byte counts as 1 WU. That is why its total falls from about 148 vB to about 68 vB.

Taproot goes further for the common single-signature case. A key-path spend needs no public key in the witness, because the output already commits to it, and the Schnorr signature has a fixed length of 64 bytes. The saving is about 10 vB per input compared with a native SegWit key input.

Two caveats keep this honest. First, the saving per input is real but modest next to the effect of simply having fewer inputs. Second, a Taproot output is larger than a native SegWit output, so a wallet that mostly receives one output and spends one input sees a different balance of costs than the ten-input case above.

Fee rate in practice

The fee rate is set by you, or your wallet, at the moment you build the transaction. Miners then rank waiting transactions by it. How the market sets the going rate is covered in the fee market guide. Here are the practical points about the unit itself.

  • sat/vB and sat/kvB: node software often reports rates per thousand virtual bytes. 1 sat/vB equals 1,000 sat/kvB, which is 0.00001 BTC per kvB.
  • sat/WU: a few tools print rates per weight unit. Because 1 vB is 4 WU, 1 sat/vB is 0.25 sat/WU.
  • Fractional rates: since Bitcoin Core 30.0 lowered the default minimum relay fee to 0.1 sat/vB, per the release notes, fractional rates are meaningful. Whether your transaction propagates still depends on what the nodes it reaches accept.
  • Rounding: because virtual size is rounded up, a tiny difference in weight can change the fee by up to one rate unit.

The live box shows the fee figures the desk is reading, with source and time.

How many transactions fit in a block

A block has 1,000,000 vB of room in total, and the coinbase transaction uses a little of it. A block made entirely of the 141 vB native SegWit payments above could hold about 7,000 of them, since 1,000,000 divided by 141 is roughly 7,092. A block of the 10-input shape at 753 vB holds about 1,300.

These are ceilings from arithmetic, not typical counts. Real blocks mix many shapes, and the number changes with what users actually send.

Using the numbers yourself

You can do the calculation without any tool. Take the virtual size shown by your wallet or node, multiply by the fee rate, and compare it with the fee shown. If they disagree by more than rounding, something is mislabeled, and it is worth finding out what before you broadcast.

The desk’s fee estimator performs this multiplication and shows the inputs next to the result. The network hub lists the live fee data with its source. If a transaction has already been broadcast and is stuck, the next step is covered in the guide on replace-by-fee and CPFP.

This guide is educational and is not financial advice. The sizes are derived from serialization rules and are approximate, so check the virtual size your own software reports.

Frequently asked questions

What is the difference between a byte and a virtual byte?

A byte is raw length. A virtual byte is weight divided by four, where witness bytes count one unit and other bytes count four. For a transaction with no witness data the two are equal. SegWit transactions are smaller in virtual bytes than in raw bytes.

Is the fee based on the amount I send?

No. The fee is the fee rate multiplied by the transaction's virtual size. The amount does not enter the calculation. What matters is how many inputs and outputs the transaction has and what kinds of scripts they use.

Why does my wallet show a different size than a block explorer?

One may show raw bytes and the other virtual bytes, or one may round while the other shows a decimal. Compare like with like: virtual size is weight divided by four, rounded up. Estimated size before signing can also differ slightly from the final size.

How many transactions fit in one block?

There is no fixed number. A block holds up to 4,000,000 weight units, or 1,000,000 virtual bytes. The count depends on transaction sizes, so a block of small payments holds far more transactions than a block of large ones.

Sources

  1. BIP141: Segregated Witness (consensus layer) · Bitcoin Improvement Proposals
  2. BIP341: Taproot, SegWit version 1 spending rules · Bitcoin Improvement Proposals
  3. Bitcoin Core consensus.h (MAX_BLOCK_WEIGHT, WITNESS_SCALE_FACTOR) · Bitcoin Core
  4. Bitcoin Core 30.0 release notes · Bitcoin Core
  5. Developer guide: transactions · Bitcoin Core developer documentation

Educational data only. Not financial, investment or tax advice; no licence is claimed. Bitcoin Prime publishes no forecasts, targets or trading signals.