Magnus Olafsson (Old Norse: Magnús Óláfsson, Norwegian and Danish: Magnus Olavsson; c.
1024 – 25 October 1047), better known as Magnus the Good (Old Norse: Magnús góði, Norwegian and Danish: Magnus den gode), was the King of Norway from 1035 and King of Denmark from 1042, ruling over both countries until his death in 1047.
He was an illegitimate son of Olaf II of Norway, but fled with his mother when his father was dethroned in 1028.
He returned to Norway in 1035 and was crowned king at the age of 11.
In 1042, he was also crowned king of Denmark.
Magnus ruled the two countries until 1047, when he died under unclear circumstances.
After his death, his kingdom was split between Harald Hardrada in Norway and Sweyn Estridsson in Denmark.