please don't create incomplete guides like this one here with a misleading formula. what you have found on the internet belongs to many years ago where bitcoin only had 1 type of transactions with 2 type of public keys (compressed and uncompressed) nowadays there are more variations and that formula is so complicated that you better leave it to your wallet to automatically calculate it for you.
of if you want to post a guide then do it completely by including all the possible cases with different types of input/output. and keep in mind that fees are no longer measured in satoshi/byte but instead in satoshi/virtualByte
also please don't suggest bitcoinfees.earn.com (
https://bitcointalk.org/index.php?topic=2848987.msg30657510#msg30657510)
Now back you your calculation @RapTarX
2*180 + 3*34 + 10 + or - 2 = 470/456 bytes.
we do see a +2 or -2 resulting into 470/456 bytes.
it is because the day Satoshi created bitcoin he decided to use a third party library for signature stuff. this library is the OpenSSL library. there the encoding used for signatures is a wasteful and in one word stupid encoding for something like bitcoin.
to keep it simple here is how it works:
when you create an ECDSA signature you basically have 2 n-bits integers (256 bit for bitcoin's curve) in this particular encoding, on top of other wasted bytes you
sometimes have to add an additional byte (=0) to the start of these integers to tell everyone reading the encoding that the numbers are positive. so sometimes you end up with
(some other bytes) + 1 + 32 + 1 + 32 or
(some other bytes) + 0 + 32 + 0 + 32 or
(some other bytes) + 1 + 32 + 0 + 32 or
(some other bytes) + 0 + 32 + 1 + 32
hence the +-2
which again brings us back to the first line of this comment! nowadays the second number is changed for some reasons (outside of the scope of this topic) so it will always be smaller than 32 byte. and there is a much newer change which also changes the first number so that it is 32 bytes (in some implementations such as bitcoin-core) so you will always end up with the same 32 byte size hence a fixed signature size.