In astronomy, the binary mass function or simply mass function is a function that constrains the mass of the unseen component (typically a star or exoplanet) in a single-lined spectroscopic binary star or in a planetary system. It can be calculated from observable quantities only, namely the orbital period of the binary system, and the peak radial velocity of the observed star. The velocity of one binary component and the orbital period provide information on the separation and gravitational force between the two components, and hence on the masses of the components.