Your formula is only accurate for non-segwit (and non-multisig) inputs.
A SegWit input will take up 91 bites and a bech32 input (a different type of SW address that starts with BC1) will take up 68 bites of block space after accounting for the witness (signature) discount.
Please link me toward the calculation of Segwit and bech32 segwit transaction size calculation. Interested to learn it.
yes, your calculation works only for non-segwit inputs specifically utxo from uncompressed legacy addresses
for non-segwit compressed legacy you simply replace 180 with 148
checkout
coinb.in's fee calculator that was mentioned by LoyceV in the post above
it should give you estimate size on almost all different possible inputs, except bech32