Although the post is not hereditary, the queen said Thursday she hoped Charles -- her oldest son -- would take over when she dies.
"It is my sincere wish that the commonwealth will continue to offer stability and continuity for future generations, and will decide that one day the prince of Wales should carry on the important work started by my father in 1949," the queen told the heads of state.
Commonwealth leaders, who met Friday at Windsor Castle for a second and final day, agreed to her wish.
The decision on who succeeds the queen as head of the commonwealth -- which represents about 2.4 billion people -- needed to be unanimous.
Elizabeth, who turns 92 on Saturday, assumed the post in 1952 after the death of her father.