The Dean of Windsor paid tribute to Prince Philip's "kindness, humour and humanity" during the ceremony.
The congregation wore masks and was socially distanced in line with Covid rules, with the Queen seated alone.
The duke's children walked behind his coffin in a funeral procession, followed by a national minute's silence.
More than 730 members of the armed forces took part in the event, but there was a limit of 30 mourners inside St George's Chapel, under coronavirus rules.
Prince Philip died at Windsor Castle on Friday 9 April, aged 99.