The first king who is generally regarded as having ruled over all of Scotland was Kenneth MacAlpin, who had managed to conquer both the Picts and the Scots by 842. No-one knows exactly when he was declared king, so 843 is an approximation. All the kings of Scotland until the thirteenth century were descended from Kenneth MacAlpin whether through the male or female line, though different branches of the royal house were often deadly rivals for the throne.
The last king of a separate Scotland was James VI, who died in 1625. In 1603, he also became King of England as King James I.
House of MacAlpin
Kenneth MacAlpin c.843–c.858
Donald I 859–862
Constantine I 862–876
Interregnum
Interregnum – no overall king 876–877
House of MacAlpin
Aed c.877–878
Eochaid 878–889 and Giric 878–889 (probably shared the throne)
Donald II 889–900
Constantine II 900–c.943
Malcolm I MacDonald c.943–954
Indulf 954–962
Dubh ‘the Black’ 962–966
Culen 966–971
Kenneth II 971–995
Constantine III ‘the Bald’ 995–997
Kenneth III 997–1005
Malcolm II 1005–1034
Duncan I 1034–1040
House of Moray
Macbeth 1040–1057
Lulach 1057–1058
House of MacAlpin
Malcolm III Canmore 1058–1093
Donald III Bane 1093–1094
Duncan II 1094
Donald III Bane 1094–1097 (resumed the throne)
Edgar 1097–1107
Alexander I 1107–1124
David I 1124–1153
Malcolm IV ‘the Maiden’ 1153–1165
William ‘the Lion’ 1165–1214
Alexander II 1214–1249
Alexander III 1249–1286
Margaret, ‘the Maid of Norway’ 1286–1290
Interregnum
English overlordship (Edward I) 1290–1292
House of MacAlpin
John Balliol 1292–1296 (abdicated)
English invasion and Occupation
Edward I of England 1296–1306
House of Bruce
Robert I de Brus (Bruce) 1306–1329
David II 1329–1371
House of Stewart
Robert II ‘the Steward’ 1371–1390
Robert III (John Stewart) 1390–1406
James I 1406–1437
James II 1437–1460
James III 1460–1488
James IV 1488–1513
James V 1513–1542
Mary, Queen of Scots 1542–1567
James VI 1567–1625 (became James I of England, 1603)