The men died in Helmand's restive Sangin district, when the base was hit by rocket-propelled and small arms fire, Captain Drew Gibson, a UK military spokesman said on Sunday.
Gibson said the base had been under attack by Taliban fighters for the past three nights.
"The first two [nights] it was fairly minor - last night was a fairly concentrated attack," he said from Helmand.
A total of five British soldiers have died in Afghanistan in the past three weeks, since a new deployment of British troops began arriving in the province in April.
Last week two British soldiers died, also in Sangin, in fighting with Taliban forces.
Britain currently has about 4,000 troops in Afghanistan, the bulk of whom are serving in the Helmand province.
Also on Sunday, Afghan police said that at least 11 Taliban fighters were killed in the same district on Saturday evening after the Afghan army, police and coalition came under attack.
It was not immediately clear if it was the same incident in which the British soldiers lost their lives.
"Twelve Taliban bodies were left at the site after two hours of fighting with joint forces," Helmand police chief Mohammad Nabi Mullah Khail said.