The stars in a binary system orbit around the common center of mass for the system (whether we can see both stars or not). with the motion described by a modified form of Kepler's 3rd Law:
where P is the orbital period, m1 and m2 are the respective masses, and R = d1 + d2.
Thus, it is clear that if by careful observation we can estimate the separation between the seen and unseen star and the period for their revolution around each other, we can estimate the total mass of the system.