In this paper we present a formalism for the calculation of electron transportthrough three-terminal junction devices, which have received attentiondue to their recently demonstrated non-linear electrical properties. Theformalism, which is based on the scattering-matrix method, takes quantuminterference effects fully into account. Furthermore, the formalism providesnumerical stability in the calculations as well as large flexibility in themodelling of arbitrary potential profiles due to the common basis approachused in the formulation. The method is used to calculate the transportproperties for Y-shaped three-terminal ballistic junction (TBJ) structures withconfigurations typical of recently performed experiments. Quantum interferenceeffects are shown to strongly influence the transport characteristics of TBJstructures due to complex scattering of the electrons in the cavity-like couplingwindow between the three arms of the device. The theoretical approachpresented in this paper provides a flexible tool for the study of such quantuminterference effects, which may play an important role in the design andfunctionality of future nanoscale devices based on three-terminal junctions.