Winnecke 4 (also known as Messier 40 or WNC 4) is an optical double star consisting of two unrelated stars in a northerly zone of the sky, Ursa Major.
The pair were discovered by Charles Messier in 1764 while he was searching for a nebula that had been reported in the area by Johannes Hevelius. Not seeing any nebulae, Messier catalogued this apparent pair instead. The pair were rediscovered by Friedrich August Theodor Winnecke in 1863, and included in the Winnecke Catalogue of Double Stars as number 4. Burnham calls M40 "one of the few real mistakes in the Messier catalog," faulting Messier for including it when all he saw was a double star, not a nebula of any sort.
In 1991 the separation between the components was measured at 51.7″, an increase since 1764. Data gathered by astronomers Brian Skiff (2001) and Richard L. Nugent (2002) strongly suggested the subject was merely an optical double star rather than a physically connected (binary) system. The A star that seems the brighter is over twice as far as B. Parallax measurements from the Gaia satellite show the two stars, HD 238107 and HD 238108, are at distances of 1013+/- and 470.2+/- respectively. HD 238108 is itself a genuine binary star, with an 18th magnitude white dwarf companion 5 arcseconds away and a parallax distance of 478.8+/-.