We present a general analytical formula and an ab initio study of quantum interference in multi-branch molecules. Ab initio calculations are used to investigate quantum interference in a benzene-1,2-dithiolate (BDT) molecule sandwiched between gold electrodes and through oligoynes of various lengths. We show that when a point charge is located in the plane of a BDT molecule and its position varied, the electrical conductance exhibits a clear interference effect, whereas when the charge approaches a BDT molecule along a line normal to the plane of the molecule and passing through the centre of the phenyl ring, interference effects are negligible. In the case of olygoynes, quantum interference leads to the appearance of a critical energy $E_c$, at which the electron transmission coefficient $T(E)$ of chains with even or odd numbers of atoms is independent of length. To illustrate the underlying physics, we derive a general analytical formula for electron transport through multi-branch structures and demonstrate the versatility of the formula by comparing it with the above ab-initio simulations. We also employ the analytical formula to investigate the current inside the molecule and demonstrate that large counter currents can occur within a ring-like molecule such as BDT, when the point charge is located in the plane of the molecule. The formula can be used to describe quantum interference and Fano resonances in structures with branches containing arbitrary elastic scattering regions connected to nodal sites.