As ranochigo noted, the differences based on the type of
output you're creating a very minimal... almost to the point of being inconsequential in the grand scheme of things (unless you're paying fee rates in the 1000's of sats/byte
)
The general rule of thumb is that (when considering the size of inputs):
native segwit < nested segwit < legacy
Of course, this only applies when the number of inputs being used to construct the transaction is the same... That is to say, the fact you're using native segwit inputs won't really matter if you're using 100 inputs
Please is there any book or guild that can be used to calculate bitcoin fee in a way I will be able to know how to calculate bitcoin fee even for inputs and outputs and also for sending from one bitcoin addresses to another.
This tool is pretty simple:
https://btc.network/estimateYou can set inputs/outputs and whether or not you're using SegWit... but it seems to be "ignoring" the slight differences in output type, so it doesn't show the differences for sending from one type to the other... which, as stated, are really quite insignificant. 3 bytes per output? for a standard transaction that's like ~2% on a 1 input/2 output SegWit transaction... and ~1% on a 1 in/2out legacy transaction.
It also, has some explanation on how it is calculating the transaction sizes... and the assumptions it is making when doing so.