I don't recall ever doing this mathematically, I have always used computational chemistry for this purpose.
If it were required then personally I would consider bond lengths and bond angles for this.
However I am not sure if this is the most accurate (or indeed correct) method for calculating the lenght of a molecule.