pull down to refresh

I don’t understand how to calculate the fee when looking at the sats/vB. Can somebody help? Thanks!
Bitcoin fee rates talk about how much data is required to explain the transaction, not how much bitcoin there is.
So, complicated scripts like multisigs or paying to a whole lot of different addresses will be more expensive to send because they take up more bytes. The simpler the transaction, the smaller the amount of data required to express it and the cheaper it will be.
1000 bitcoin locked with a single key in a segwit address us less bytes than 1000 sats locked in a 12 of 12 multisig address. In this example, its cheaper to send the 1000 bitcoin utxo than the 1000 sat utxo.
reply
That’s helpful, thx!!
Is there a way to figure out how much it would cost to send a transaction? For example- if I have 1M sats that are made up of 5 inputs in a single sig HW wallet, how could I figure out how much the fee would be to send those 1M sats another wallet?
Also adding this question on another response in case you don’t know!
reply
It depends on the output type of the UTXOs you are spending.
If they start with
  • 1…, they are Pay to Public Key Hash (P2PKH) aka legacy outputs and spending them their inputs weight 148 vB
  • 3…, they are probably Pay to Script Hash-wrapped Pay to Witness Public Key Hash (P2SH-P2WPKH) aka wrapped segwit outputs and spending them weighs 91 vB for each (since you said they're single-sig)
  • bc1q… they are Pay to Witness Public Key Hash (P2WPKH, native segwit v0) and their input weight is 68 vB
  • bc1p… they are Pay to Taproot (P2TR, native segwit v1) outputs and weigh 57.5 vB to spend
So, if e.g. your UTXOs were P2PKH 5 × 148 vB × 100 s/vB = 74 000 sats, if they’re P2WPKH it’s 5 × 68 vB × 100 s/vB = 34 000 sats.
To that you’ll still need to add the weight of the recipient output, change output, and transaction header. Outputs are also different weight depending on type, ranging 31–43 vB. The header should be either 10 vB or 10.5 vB depending on whether your inputs are segwit or not.
reply
You are a saint
reply
This website might be helpful:
I think you are looking at 800 vbytes, @ 100 sats per vybte total fee is 80000 sats.
(I'm not totally sure on that, it sounds a little high to me).
reply
reply
You can use mempool.space. It shows you which fee you should set based on how fast you want to get your tx confirmed ("priority"):
Btw, the fee has nothing to do with the value of your UTXO.
A 1k sats UTXO has to pay the same fee as a 1M sats UTXO since they probably would use the same amount of bytes in a block. Maybe that's where your confusion comes from?
If you want to get the absolute fee, you need to know how many (virtual) bytes your tx contains. That indeed depends on your UTXO but not on the value of your UTXO. For example, UTXOs from a multisig setup are more expensive since they contain larger scripts / "are more complicated".
reply
I should have used "fee rate" instead of "fee". Fee rates make it more clear that we're talking about sat/vB and not about an absolute fee in sats.
You can use mempool.space. It shows you which fee fee rate
Btw, the fee fee rate has nothing to do with the value of your UTXO.
reply
That’s helpful, thx!!
Is there a way to figure out how much it would cost to send a transaction? For example- if I have 1M sats that are made up of 5 inputs in a single sig HW wallet, how could I figure out how much the fee would be to send those 1M sats another wallet?
reply
Which wallet do you use?
Sparrow wallet shows you the transaction in hex. If you have the hex string, you should be able to divide the length of that hex string by 2 (since one byte basically fits into two hex characters: 0xff = 255 = 2^8 - 1 and one byte is 8 bits) to get how many bytes this transaction has.
However, since SegWit (Segregated Witness), we use "virtual bytes" for fee rates. So the witness part is weighted less. So it's actually more complicated than just counting bytes.
That's where my knowledge starts lacking, so I'll stop here. Hopefully someone else will chime in and explain it better to you in more detail.
reply
Just realized I never responded to you- thx for the info. I have a ledger with a couple UTXOs that I need to consolidate.
reply
reply
As a lowbrow rule of thumb, I multiply whatever the sats/vB is by 250. In sats, that's the lowest it will cost to send (1 signature, 1 UTXO).
reply
Pull up your wallet using Sparrow Wallet and you can view the details of a UTXO (such as the size in vB).
If your UTXO is 140 vB and the fee to send is 100 sats/vB, then your fee for that one UTXO would be 140 * 100 = 14,000 sats.
If you have multiple UTXOs, you'd have to view the size of each of them, add them all together, then do the calculation.
reply
Sure! Calculating fees can be a bit confusing. You simply divide the fee by the total sats/vB. Hope this helps!
Sure! When calculating the fee, you can divide the sats/vB by the current fee rate in sats/vbyte to get the actual fee amount. Hope this clarifies things for you!
reply
Sure, calculating fees can be confusing at first. To calculate it, divide the current fee rate (in sats) by the size of your transaction in virtual bytes (vB). This will give you the fee in sats/vB. Good luck!
deleted by author
reply