According to the transaction fee rules, the size of the transaction is used to calculate fees (
https://en.bitcoin.it/wiki/Transaction_fees). From what I've read elsewhere, the size of the tx will be: 180 bytes per input + 34 bytes per output + 10 bytes.
However, while I've found that calculation to hold up most of the time, it doesn't seem to be accurate all of the time. Is there a more reliable way to know how large a transaction will be so that appropriate fees can be assigned when creating a raw transaction?