Life

Early life

The first appearance of Holmes, 1887
Explicit details about Sherlock Holmes's life outside of the adventures recorded by Dr. Watson are few and far between in Conan Doyle's original stories; nevertheless, incidental details about his early life and extended families portray a loose biographical picture of the detective.
An estimate of Holmes's age in the story "His Last Bow" places his birth in 1854; the story is set in August 1914 and he is described as being 60 years of age. Commonly, the date is cited as 6 January.  However, an argument for a later birthdate is posited by author Laurie R. King, based on two of Conan Doyle's stories: A Study in Scarlet and "The Gloria Scott" Adventure. Certain details in "The Gloria Scott" Adventure indicate Holmes finished his second and final year at university in either 1880 or 1885. Watson's own account of his wounding in the Second Afghan War and subsequent return to England in A Study in Scarlet place his moving in with Holmes in either early 1881 or 1882. Together, these suggest Holmes left university in 1880; if he began university at the age of 17, his birth year would likely be 1861.
Holmes states that he first developed his methods of deduction while an undergraduate. The author Dorothy L. Sayers suggested that, given details in two of the Adventures, Holmes must have been at Cambridge rather than Oxford and that "of all the Cambridge colleges, Sidney Sussex (College) perhaps offered the greatest number of advantages to a man in Holmes's position and, in default of more exact information, we may tentatively place him there".
His earliest cases, which he pursued as an amateur, came from fellow university students.  According to Holmes, it was an encounter with the father of one of his classmates that led him to take up detection as a profession,  and he spent the six years following university working as a consulting detective, before financial difficulties led him to take Watson as a roommate, at which point the narrative of the stories begins.
From 1881, Holmes was described as having lodgings at 221B, Baker Street, London, from where he runs his consulting detective service. 221B is an apartment up 17 steps, stated in an early manuscript to be at the "upper end" of the road. Until the arrival of Dr. Watson, Holmes worked alone, only occasionally employing agents from the city's underclass, including a host of informants and a group of street children he calls "the Baker Street Irregulars". The Irregulars appear in three stories: "A Study in Scarlet," "The Sign of the Four," and "The Adventure of the Crooked Man".
Little is said of Holmes's family. His parents were unmentioned in the stories and he merely states that his ancestors were "country squires". In "The Adventure of the Greek Interpreter", Holmes claims that his great-uncle was Vernet, the French artist. His brother, Mycroft, seven years his senior, is a government official who appears in three stories  and is mentioned in one other story.  Mycroft has a unique civil service position as a kind of memory-man or walking database for all aspects of government policy. Mycroft is described as even more gifted than Sherlock in matters of observation and deduction, but he lacks Sherlock's drive and energy, preferring to spend his time at ease in the Diogenes Club, described as "a club for the most un-clubbable men in London".

Life with Dr. Watson

A portrait of Sherlock Holmes by Sidney Paget from The Strand Magazine, 1891 in "The Man with the Twisted Lip".
Holmes shares the majority of his professional years with his good friend and chronicler Dr. John H. Watson, who lives with Holmes for some time before his marriage in 1887, and again after his wife's death; his residence is maintained by his landlady, Mrs. Hudson.
Watson has two roles in Holmes's life. First, he gives practical assistance in the conduct of his cases; he is the detective's right-hand man, acting variously as look-out, decoy, accomplice and messenger. Second, he is Holmes's chronicler (his "Boswell" as Holmes refers to him). Most of the Holmes stories are frame narratives, written from Watson's point of view as summaries of the detective's most interesting cases. Holmes is often described as criticising Watson's writings as sensational and populist, suggesting that they neglect to accurately and objectively report the pure calculating "science" of his craft.
Detection is, or ought to be, an exact science and should be treated in the same cold and unemotional manner. You have attempted to tinge it ["A Study in Scarlet"] with romanticism, which produces much the same effect as if you worked a love-story ... Some facts should be suppressed, or, at least, a just sense of proportion should be observed in treating them. The only point in the case which deserved mention was the curious analytical reasoning from effects to causes, by which I succeeded in unravelling it.
—Sherlock Holmes on John Watson's "pamphlet", "The Sign of Four".
Nevertheless, Holmes's friendship with Watson is his most significant relationship. In several stories, Holmes's fondness for Watson—often hidden beneath his cold, intellectual exterior—is revealed. For instance, in "The Adventure of the Three Garridebs", Watson is wounded in a confrontation with a villain; although the bullet wound proves to be "quite superficial", Watson is moved by Holmes's reaction:
It was worth a wound; it was worth many wounds; to know the depth of loyalty and love which lay behind that cold mask. The clear, hard eyes were dimmed for a moment, and the firm lips were shaking. For the one and only time I caught a glimpse of a great heart as well as of a great brain. All my years of humble but single-minded service culminated in that moment of revelation.
In all, Holmes is described as being in active practice for 23 years, with Watson documenting his cases for 17 of them.

Retirement

In "His Last Bow", Holmes has retired to a small farm on the Sussex Downs in 1903–1904, as chronicled by Watson in his preface to the series of stories entitled "His Last Bow." It is here that he has taken up the hobby of beekeeping as his primary occupation, eventually producing a "Practical Handbook of Bee Culture, with some Observations upon the Segregation of the Queen". The story features Holmes and Watson coming out of retirement one last time to aid the war effort. Only one adventure, "The Adventure of the Lion's Mane", which is narrated by Holmes as he pursues the case as an amateur, takes place during the detective's retirement. The details of his death are not known.