Bytes for P2WPKH Fee Calculation
Estimate virtual size, total fee, and effective Bitcoin transaction cost for native SegWit Pay-to-Witness-Public-Key-Hash transactions. This calculator helps you model how many vbytes a P2WPKH transaction uses and how your chosen feerate affects final miner fees.
P2WPKH Fee Calculator
Typical estimate: each P2WPKH input is about 68 vbytes.
A standard recipient plus change is often 2 outputs total.
1 sat/vB is low priority. Higher values typically confirm faster.
Used only to convert total fee into approximate USD.
Optional context for fee percentage calculation.
Applies a simple planning multiplier to compare urgency scenarios.
Results
Enter your transaction details and click Calculate Fee to estimate P2WPKH transaction vbytes and miner fee.
Expert Guide to Bytes for P2WPKH Fee Calculation
When you broadcast a Bitcoin transaction, miners do not price it by the nominal amount of bitcoin you move. They price it by transaction size. For modern SegWit transactions, the most useful measurement is vbytes, also called virtual bytes. If you are sending from a native SegWit wallet that uses P2WPKH, understanding how many bytes or vbytes your transaction consumes is essential for choosing an efficient fee and avoiding overpayment.
P2WPKH stands for Pay to Witness Public Key Hash. It is the native SegWit form that typically appears in bech32 addresses beginning with bc1q. Compared with legacy P2PKH, P2WPKH reduces transaction weight by moving signatures into the witness structure, which gets discounted under Bitcoin’s weight formula. That discount is why native SegWit transactions usually cost less than equivalent legacy transactions even when the same amount of bitcoin is transferred.
For practical fee estimation, many wallet engineers and node operators use a standard rule of thumb:
- Each P2WPKH input is approximately 68 vbytes
- Each P2WPKH output is approximately 31 vbytes
- Transaction overhead is about 10.5 vbytes
That leads to a quick working formula:
Total transaction size in vbytes ≈ 10.5 + (68 × number of P2WPKH inputs) + (31 × number of P2WPKH outputs)
Total fee in satoshis = transaction vbytes × feerate in sat/vB
This calculator uses that widely accepted P2WPKH planning model. It is ideal for standard single-signature native SegWit transactions. If you are working with Taproot, multisig, legacy inputs, coinjoin structures, or exotic script paths, the size will differ.
Why vbytes matter more than raw bytes
Bitcoin’s post-SegWit block policy uses weight units rather than raw bytes alone. Non-witness data counts four times heavier than witness data. To simplify fee markets, users commonly convert weight into virtual bytes by dividing total weight by four. This is why a SegWit transaction can be physically one size when serialized, yet have a lower billed size in vbytes. In practice, wallets quote feerates as sat/vB because that is the easiest way to compare transactions.
If a transaction is 140 vbytes and you choose 20 sat/vB, the fee is:
- 140 × 20 = 2,800 satoshis
- 2,800 satoshis = 0.00002800 BTC
- At a BTC market price of $65,000, the fee is about $1.82
That fee calculation is small, transparent, and easy to compare against faster or slower confirmation targets. The key input is not your payment amount, but the number of UTXOs you spend. If your wallet uses many small inputs, your transaction grows quickly and the fee rises with it.
How P2WPKH transaction size is built
A standard native SegWit single-signature transaction contains several components:
- Transaction overhead, including version, locktime, marker, flag, and compact counts
- Inputs, each referencing an older UTXO and including a witness signature and public key
- Outputs, each defining where bitcoin will go next
The reason inputs dominate cost is that each input must carry unlocking data. In P2WPKH, the signature and public key live in the witness area and therefore benefit from discounted weight. That discount is what pushes a standard P2WPKH input down to roughly 68 vbytes instead of the larger size seen in legacy P2PKH transactions.
| Component | Typical Size | Notes |
|---|---|---|
| P2WPKH input | ~68 vbytes | Native SegWit single-signature input estimate widely used for fee planning |
| P2WPKH output | ~31 vbytes | Typical output paying to a bech32 native SegWit address |
| Transaction overhead | ~10.5 vbytes | Version, locktime, marker, flag, and count fields |
| Bitcoin block limit | 4,000,000 weight units | Equivalent to a maximum of about 1,000,000 vbytes in the all non-witness extreme |
| Dust threshold for typical P2WPKH output | Commonly treated around 294 sats | Policy driven estimate often referenced in wallet engineering contexts |
The block weight limit above comes from SegWit-era consensus rules and matters because all transactions compete for a limited amount of block space. That competition drives feerates up during congestion and down during quiet mempool periods.
Real world examples of P2WPKH fee calculation
Suppose you have one UTXO and want to send funds to one recipient while receiving change back to your own wallet. That means:
- 1 P2WPKH input
- 2 P2WPKH outputs
Your estimated transaction size is:
10.5 + 68 + (31 × 2) = 140.5 vbytes
Since fees are paid in satoshis, many wallet estimators round size to the nearest whole vbyte, often 141 vbytes. At different feerates, your fee changes as follows:
| Transaction Pattern | Estimated vbytes | 5 sat/vB | 15 sat/vB | 30 sat/vB | 60 sat/vB |
|---|---|---|---|---|---|
| 1 input, 2 outputs | 140.5 | 703 sats | 2,108 sats | 4,215 sats | 8,430 sats |
| 2 inputs, 2 outputs | 208.5 | 1,043 sats | 3,128 sats | 6,255 sats | 12,510 sats |
| 3 inputs, 2 outputs | 276.5 | 1,383 sats | 4,148 sats | 8,295 sats | 16,590 sats |
| 5 inputs, 2 outputs | 412.5 | 2,063 sats | 6,188 sats | 12,375 sats | 24,750 sats |
The lesson is immediate: input count matters more than payment amount. Sending 0.50 BTC from one UTXO can cost less than sending 0.01 BTC from five fragmented UTXOs because the larger payment may actually consume fewer vbytes.
How UTXO management changes your fee outcome
Every Bitcoin wallet holds spendable pieces of value called UTXOs, or unspent transaction outputs. When you spend bitcoin, your wallet chooses one or more of these outputs as inputs to a new transaction. If your balance is fragmented into many small UTXOs, your transaction will need more inputs, increasing vbytes and therefore the miner fee.
This is why UTXO consolidation matters. During low-fee periods, some users intentionally send coins to themselves to merge many small inputs into fewer larger ones. That can reduce future transaction sizes dramatically. However, consolidation itself costs a fee and can have privacy implications, so it should be done deliberately.
Ways to reduce P2WPKH fees
- Spend fewer inputs when possible
- Consolidate UTXOs during quiet mempool periods
- Use native SegWit receiving addresses
- Avoid creating unnecessary change outputs
- Monitor mempool conditions before sending
Common reasons fees rise unexpectedly
- Your wallet selected many small UTXOs
- The mempool is congested
- You chose an aggressive confirmation target
- The transaction creates multiple recipients and change outputs
- Wallet safety buffers rounded the feerate upward
P2WPKH compared with older and newer address types
P2WPKH is not the only transaction type in Bitcoin, but it remains one of the most common and efficient for standard single-signature spending. Legacy P2PKH transactions are larger because signatures sit in the main body rather than the witness. Taproot key-path spends can be even more efficient in many cases, especially when modern wallet stacks are optimized for them. Still, P2WPKH remains a widely supported default and is often the easiest type to model accurately.
As a rough practical comparison:
- Legacy P2PKH input: around 148 bytes
- P2SH-P2WPKH input: around 91 vbytes
- Native P2WPKH input: around 68 vbytes
- Taproot key-path input: often around 58 vbytes
Those estimates are useful because they show where native SegWit fits in the Bitcoin fee landscape. If your wallet still sends from legacy addresses, moving to native SegWit can materially reduce average fees over time.
Choosing the right feerate
Calculating transaction bytes is only half of the problem. The second half is choosing a feerate. A feerate is quoted in satoshis per virtual byte. The actual fee paid is simply:
feerate × transaction vbytes
Wallets often provide labels like economy, normal, and priority. Underneath, those labels correspond to a feerate the wallet believes will confirm within a certain number of blocks. If the mempool is calm, 2 to 5 sat/vB might be enough. During heavy demand, 20, 50, or even more sat/vB may be needed for fast inclusion. Because block space is a competitive auction, there is no universal constant. The right number depends on current demand, your urgency, and whether your wallet supports fee bumping later.
Fee bumping and transaction safety
If your initial estimate was too low, a transaction can remain unconfirmed for longer than expected. To manage this risk, many wallets support:
- Replace-By-Fee (RBF), which lets you rebroadcast a replacement transaction with a higher feerate
- Child-Pays-For-Parent (CPFP), where a follow-up spend provides additional fee incentive for miners to confirm both transactions
These tools matter because fee estimation is not perfect. The mempool can shift rapidly. A calculator gives you a strong size estimate, but the market-clearing feerate is still dynamic.
Authoritative references for further study
If you want to validate the policy and protocol concepts behind P2WPKH fee estimation, the following resources are useful:
- National Institute of Standards and Technology (NIST) for broader cryptographic standards context
- MIT OpenCourseWare for academic material related to cryptography and distributed systems
- University of Pennsylvania School of Engineering and Applied Science for computer science and blockchain-adjacent academic resources
Best practices for using a P2WPKH fee calculator
For accurate planning, treat the calculator as a transaction design tool rather than a promise of final network behavior. Count how many inputs your wallet is likely to spend, not just how much bitcoin you intend to send. Include all outputs, especially change. Then test several feerates to understand the cost difference between slow and fast confirmation targets.
In many cases, the biggest optimization opportunity is not finding a magical low feerate but reducing input count. If you control a wallet with heavily fragmented UTXOs, better UTXO hygiene can save more over a year than shaving one or two sat/vB off individual transactions.
Final takeaway
P2WPKH fee calculation is straightforward once you understand the variables. Estimate size using the standard native SegWit model, multiply by your chosen sat/vB rate, and then evaluate whether the resulting cost fits your urgency and payment size. For standard native SegWit spending, the rule of thumb of 68 vbytes per input, 31 vbytes per output, and 10.5 vbytes overhead is an excellent starting point.
Use the calculator above to compare scenarios instantly. Try increasing inputs, lowering feerate, or removing an extra output to see how each change impacts the final miner fee. That hands-on approach is the fastest way to build intuition for Bitcoin fee efficiency.