In astronomy, a contact binary is a binary star system whose component stars are so close that they touch each other or have merged to share their gaseous envelopes. A binary system whose stars share an envelope may also be called an overcontact binary. The term "contact binary" was introduced by astronomer Gerard Kuiper in 1941. Almost all known contact binary systems are eclipsing binaries; eclipsing contact binaries are known as W Ursae Majoris variables, after their type star, W Ursae Majoris.
In a contact binary, both stars have filled their Roche lobes, allowing the more massive primary component to transfer both mass and luminosity to the secondary member. As a result, the components in a contact binary often have similar effective temperatures and luminosities, regardless of their respective masses. The rate of energy transfer between the components is dependent on their mass ratio and luminosity ratio. In cases where the stars are in geometric contact but the thermal contact is poor, there can exist wide differences between their respective temperatures.
Contact binaries are not to be confused with common envelopes. Whereas the configuration of two touching stars in a contact binary has a typical lifetime of millions to billions of years, the common envelope is a dynamically unstable phase in binary evolution that either expels the stellar envelope or merges the binary in a timescale of months to years.