The soldiers serving in NATO's International Security Assistance Force (ISAF) were killed in two days of fighting with Taliban militants around 50 kilometers (30 miles) east of Kabul. Another 21 French soldiers were injured.
"Serious measures, notably in the air, were taken to support and extricate our men, who were caught in an extremely violent ambush," Sarkozy said in a statement.
"In its struggle against terrorism, France has just been dealt a severe blow," he said.
The deaths are the largest single loss among French forces in Afghanistan since the U.S.-led invasion in 2001.
Afghan authorities said 13 Taliban fighters were killed in the violence.
Taliban rebels have increased their presence around Kabul over the past year, and have pledged to step up attacks on foreign troops.
France sent an additional 700 troops to Afghanistan earlier this year, bringing the French contingent serving with ISAF to almost 2,000. Several hundred additional French service personnel are set to be deployed in the war-torn country later this month, despite widespread public disapproval of the country's involvement in the conflict.