When we try to send monero to someone using

transfer [integrated address] 0.0016

how can we calculate the size where the priority is normal and ring size is default(may be 7)

So I need an algorithm to calculate the transaction's actual size.

Please give me an example with the algorithm


1 Answer 1


For the example you've given, where there is only one wallet destination, the transaction will have two outputs (one for the recipient, one sent back to you with your change).

A simple approximation is that the transaction size will be 6176 bytes * [output count] for the range proofs, plus for the ring signatures: [input count] * 64 bytes * [ring size].

So if you spend a single input (which contains enough funds), with a ring size of 7, this formula gives you an approximate transaction size of 6176*2+1*64*7 = 12800 bytes. In reality, it'd probably be closer to 13200 bytes, because of the simplification we've made.

When you spend funds, you probably won't be able to tell whether you're spending funds out of a single input you own, or whether the source of the funds is spanned over multiple smaller inputs you own. As you can see from the formula, in some cases, the transaction could easily be many KB larger than usual if you have to spend together lots of small inputs in order to have enough funds in total for the transaction. The answer also varies a little according to the random indices of the decoy inputs that you select during the transaction.

Therefore the simplification this answer presents should be good enough, given that you won't have the information available in advance to make a more accurate prediction of the transaction size.

Also note that Monero fees are charged on KB boundaries. Therefore a 13KB transaction will cost the same in fees as a 13.99KB transaction, but a 14.01KB transaction will cost more than a 13.99KB transaction.

It is expected that later in 2018, a new bulletproof scheme will replace Monero's existing range proofs. This will significantly lower the size of transactions.

  • Thanks for your answer can you please tell me what will be the input and out put count for 0.0016 I think here the input count is 2 and output count is 1 but how? How can I determine it for 0.0016 xmr
    – arn48
    May 29, 2018 at 12:32
  • Inputs are like physical currency coins. If you need to spend 0.0016 and you have an input of amount 0.0050. then your wallet can spend 0.0016 by only referencing one coin/input. But if your wallet only contained three inputs each of value 0.0010, then you'd need to spend two of your inputs together in your transaction in order to spend 0.0016 XMR. So the input count cannot be determined alone by the amount you're spending. You actually need to know what coins/amounts you have available to spend in your wallet. Most transactions use either 1 or 2 inputs, and have 2 outputs.
    – knaccc
    May 29, 2018 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.