The history of Stockholm Observatory begins in the 18th century, at which time people started to realise how important it was to encourage natural sciences. The Royal Swedish Academy of Sciences was founded in 1739, and the secretary of the academy from 1744, Per Elvius Jr, took the initiative to found an astronomical observatory in Stockholm. A piece of land including the highest crest of Brunkebergsåsen was donated by the town, and the construction of an observatory building began in 1748 and was completed in 1753. The architect of the building was superintendent baron Carl Hårleman, and the first director of Stockholm Observatory was Per Wilhelm Wargentin. Wargentin became Sweden's most eminent astronomer and he devoted his life to studies of the motion of Jupiter's moons.

During the 19th century several additions and renovations were made as the building grew out-of-date. But as the 20th century arrived the building and the equipment were still out-of-date, and in addition the observatory was gradually being surrounded by the town, with the consequences of street-lighting and air pollution. This made it impossible to use modern photographic equipment at the observatory.

In 1926 the astronomer Nils Nordenmark gave a lecture challenging the Academy of Sciences and the town to do something about the old and defective equipment. This lecture inspired banker Knut Wallenberg to help the observatory survive and at his request the Academy of Sciences appointed a committee that would make plans for a new observatory building. The site was chosen south-east of Stockholm for two reasons: firstly, south is the most important direction for astronomical observations and the light from the city must be avoided; secondly, the coast is generally less cloudy than inland, so the site had to be somewhere east toward the archipelago. Karlsbaderberget in Saltsjöbaden was judged to be the most suitable site.

The Royal Swedish Academy of Sciences received grants from the town and from the Knut and Alice Wallenberg Foundation (under the condition that the new observatory would still be called Stockholm Observatory) and the construction began in 1929. This time the architect was Axel Anderberg (who designed the house of the Academy of Sciences, the Museum of Natural History and the Opera in Stockholm) and the new observatory was inaugurated on 5 June 1931, with King Gustav V as guest of honour. At this time professor Bertil Lindblad was the astronomer of the Academy of Sciences and he received the scientific chief responsibility for the new observatory. Under his supervision new instruments were ordered: a double refractor, a reflector and an astrograph, all with domes. Lindblad was later appointed director of Stockholm Observatory.

The observatory was separated from the Academy of Sciences on 1 July 1973 and is now the Department of Astronomy at Stockholm University, except for the Institute for Solar Physics which is a part of the Royal Swedish Academy of Sciences. In 2001, the Department of Astronomy moved to its present location in AlbaNova University Center. The department became an observatory in the true sense of the word again by the 2007 addition of a new 1-metre reflector telescope placed in the AlbaNova dome.

Written by Cecilia Albertsson in 1996. Updated in July 2008.