Dukes in the United Kingdom
Duke, in the United Kingdom, is the highest-ranking hereditary title in all four peerages of the British Isles. A duke thus outranks all other holders of titles of nobility (marquess, earl, viscount and baron).
Peerages in the United Kingdom
The place of a peer in the order for gentlemen is taken by his wife in the order for ladies, except that a Dowager peeress of a particular title precedes the present holder of the same title. Children of peers (and "suo jure" peeresses) also obtain a special precedence. The following algorithm may be used to determine their ranks:
Over time, however, various offices were inserted at different points in the order, thereby varying it.