SatsBench

Bitcoin transaction fee estimator

Fee = size in virtual bytes (vB) × fee rate (sat/vB). Set your inputs and outputs and see the cost at today's rates.

Inputs (coins you spend)

Outputs (recipient + change)

Fee rate

PriorityRateFee

Should I consolidate UTXOs now?

Combining many small coins into one while fees are low means you pay for those inputs once, at the low rate, instead of later at a higher rate. Consolidation links the coins together on-chain, which is a privacy cost.

The vbyte math, explained

Since SegWit, block space is measured in weight units (WU). Bytes outside the witness count 4 WU each and witness bytes count 1 WU each. Virtual size is vsize = ceil(weight ÷ 4), and fee rates are quoted per vbyte (BIP141, transaction size calculations). Witness data (signatures and public keys in SegWit and Taproot inputs) is therefore 75% cheaper. That's why native SegWit and Taproot inputs cost much less than legacy ones.

Fixed overhead: version (4 B) + locktime (4 B) + input count (1 B) + output count (1 B) = 10 vB. If any input is SegWit, the marker and flag add 2 WU (0.5 vB), and each non-SegWit input in that transaction adds 1 WU for its empty witness. Counts above 252 take a 3-byte varint.

Every input carries a 36-byte outpoint (txid + index), a 4-byte sequence and its scriptSig with a length byte. Signatures are assumed to be 72 bytes including the sighash byte (DER ECDSA with low-R grinding is usually 71–72; we use the larger figure). Keys are 33-byte compressed keys, and Taproot key-path signatures are 64 bytes (BIP341, default sighash).

Input type (current m-of-n for multisig)vB per input
P2PKH (legacy, 1…)
P2SH-P2WPKH (nested SegWit, 3…)
P2WPKH (native SegWit, bc1q…)
P2TR (Taproot key path, bc1p…)
P2SH multisig (legacy, 3…)
P2SH-P2WSH multisig (nested, 3…)
P2WSH multisig (native, bc1q…)
Output typevB per output
P2PKH (1…)34
P2SH (3…)32
P2WPKH (bc1q…)31
P2WSH (bc1q…, long)43
P2TR (bc1p…)43

An output is an 8-byte amount, a length byte and the script: 25 B for P2PKH, 23 B for P2SH, 22 B for P2WPKH, 34 B for P2WSH and P2TR. You can cross-check every number with the Bitcoin Optech transaction size calculator. Small differences (±1 vB) come from signature-size assumptions.

About the live fee rates

Rates come from mempool.space's recommended fees endpoint (/api/v1/fees/recommended), fetched by your browser. They are estimates based on the current mempool. Blocks are found randomly, so "next block" is a target, not a promise. If your wallet supports Replace-By-Fee you can start low and bump later. If the API can't be reached, enter a rate by hand; the size math works offline.