Ancestry lineage from duke Siemowit of the Piast dynasty to queen Elisabeth of the Windsor dynasty:
http://blogi.newsweek.pl/Tekst/hist...ie-panujacych-ksiazat-oraz-krolow-europy.html
Siemowit I Piast duke of Mazovia & Sieradz (1215 - 1262)
Boleslav II Piast duke of Mazovia & Sandomir (1251 - 1313)
Troyden I Piast duke in Mazovia (1284 - 1341)
Eufemia princess of Cieszyn & in Mazovia (1310 - 1374) x Casimir I Piast duke of Cieszyn & in Upper Silesia (1280 - 1358)
Premislav I Piast duke of Cieszyn & in Upper Silesia (1332 - 1410)
Anne princess of Cieszyn & in Lower Silesia (1374 - 1420) x Henry IX Piast duke in Lower Silesia (1369 - 1420)
Louis III Piast duke in Lower Silesia (1405 - 1441)
John I Piast duke in Lower Silesia (1425 - 1453)
Frederick I Piast duke in Lower Silesia (1448 - 1488)
Frederick II Piast duke in Lower Silesia (1480 - 1547)
Sophia princess of Legnica (1525 - 1546) x John George Hohenzollern elector of Brandenburg (1525 - 1598)
Joachim III Frederick Hohenzollern elector of Brandenburg (1546 - 1608)
John Sigismund Hohenzollern elector of Brandenburg, prince of Prussia (1572 - 1619)
George William Hohenzollern elector of Brandenburg, prince of Prussia (1593 - 1640)
Frederick William I Hohenzollern elector of Brandenburg, prince of Prussia (1620 - 1688)
Frederick I Hohenzollern king of Prussia (1657 - 1713)
Frederick William I Hohenzollern king of Prussia (1688 - 1740)
Sophia Dorothy princess of Brandenburg-Schwedt (1719 - 1765) x Frederick William Hohenzollern margrave of Brandenburg-Schwedt (1700 - 1771)
Sophia Dorothy princess of Württemberg (1736 - 1798) x Frederick II Eugene duke of Württemberg (1732 - 1797)
Louis Frederick duke of Württemberg (1756 - 1817)
Alexander duke of Württemberg (1804 - 1885)
Francis Württemberg duke of Teck (1837 - 1900)
Mary of Teck queen of GB (1867 - 1953) x George V Koburg Windsor king of GB (1865 - 1936)
George VI Albert Windsor king of GB (1895 - 1952)
Elisabeth II Windsor queen of Great Britain (1926 - )
=================================================
So if I counted correctly, Duke Siemowit is
22 x great-grandfather of queen Elisabeth II.