Input*180 + output*34 + 10 plus or minus input
Say, input is 2 and output is to 3 address. The size is-
2*180 + 3*34 + 10 + or - 2 = 470/456 bytes.
There's a much easier solution: use
https://coinb.in/#fees, and in a few clicks you get the size including a recommended fee for a fast transaction. Note that most transactions don't need to be
fast.