Some 2,000 guests gathered in Thiepval for the service, where a daily service has been held since July to mark the anniversary of every day of the battle.
A two-minute silence and wreath laying were held to mark the occasion.
More than a million men were killed or wounded on both sides over the course of the 141-day World War One offensive.
Guests including the British ambassador to France, Lord Llewellyn of Steep, braved downpours during the service at the Thipeval Memorial to the Missing, which was led by Bishop James Newcome, the Royal British Legion national chaplain.
The Last Post was followed by a two minutes’ silence and wreath laying by figures including Earl Howe, deputy leader of the House of Lords.
A lone piper led a military escort of the wreaths to the nearby memorial, where they were laid, and both the British and French national anthems were sung.
The Rev Stephen Hancock, chaplain to the Royal British Legion Somme branch, said: “The trees and fields today mask the horror that once came here.
“I pray God that is never repeated and I pray God that the people who died are remembered.”
Over the past three months, families, communities, and dignitaries have made their way to Thiepval to stage their own acts of remembrance.
The Thiepval Memorial to the Missing is the largest Commonwealth War Graves Commission monument in the world, inscribed with the names of more than 72,000 soldiers whose bodies were never recovered or identified.
A daily service has been hosted there by the Royal British Legion to commemorate each day of the four-and-a-half month offensive, fought between 1 July and 18 November 1916.
Speaking before the service, the Rt Rev Nigel McCulloch, head of remembrance at the Royal British Legion, said those who fought had left an “enduring legacy” across the UK and Commonwealth.
He said the Royal British Legion had “led the nation in remembering the men whose sacrifice has come to symbolise the tragic scale and futility of modern industrialised warfare”.
“The last day of the Somme is a moment to reflect on the collective sacrifice of all those who fought and fell in such tragic numbers between 1 July and 18 November 1916,” he added.
In July, thousands of people – including the Prince of Wales and Duchess of Cornwall, the Duke and Duchess of Cambridge, and Prince Harry – attended a ceremony to mark the 100th anniversary of the start of the battle.
Earlier this month, it was announced that hundreds of first-hand accounts of the Somme, mostly written experiences of the soldiers who went over the top on the first day of the offensive, would be made public for the first time.
- Began on 1 July 1916 and was fought along a 15-mile front near the River Somme in northern France
- 19,240 British soldiers died on the first day – the bloodiest day in the history of the British army
- The British captured just three square miles of territory on the first day
- At the end of hostilities, five months later, the British had advanced just seven miles and failed to break the German defence
- In total, there were more than a million dead and wounded on all sides, including 420,000 British, about 200,000 from France and an estimated 465,000 from Germany