British homebuyers could be owed a huge £2bn by the taxman for overpaid stamp duty because an online calculator got its sums wrong.

The HMRC online tool is supposed to calculate the amount of stamp duty owed after buying a property. It does not take certain discounts into account, however, which could potentially be worth thousands.

If the property has a “granny annexe”, farmland or a commercial building attached to it, for example, then discounts should apply.

One advice company based in Leicestershire said that it had seen a 400% surge in claims for repayments, while HMRC is dealing with a whopping 900 cases per month.

It said that lawyers used the HMRC tool to make calculations on the stamp duty due for their clients.

The firm said that one in six homebuyers may have paid the wrong amount of stamp duty due to this issue and that this could amount to £2bn.

HMRC denied this, however, and said that most people paid the correct amount.

It said that the online calculator should only be used as a guide, but solicitors countered by saying that the taxman treated them like accountants and that the calculations required expertise that they did not have.

The main problem is that the calculator does not have an option to class a property as “mixed use”. Stamp duty on mixed-use properties is at 5%, compared to 12% for homes worth in excess of £1.5m.

The advice firm gave some examples of homebuyers who had been massively overcharged.

It said that one couple bought a home that came with a field for £1m. They paid £43,750 in stamp duty, but this should actually have been £39,500. This is because the field had been rented by a farmer and so should have qualified for a mixed-use discount.

Another woman was reportedly stung when she bought a block of multiple flats above a café for £500,000. She ended up paying £14,500 in stamp duty, but this should have been £8,400. In this case, she should have received relief on the tax because she had bought multiple dwellings.

Yet another homebuyer was charged £30,000 for stamp duty on a £500,000 house. It should actually have been £10,000 – this time because the property had an annexe.

Sarah Dwight, a solicitor on the Law Society’s Conveyancing and Land Law Committee, said: “A lot of the calculators are not up to it.

“We write to the HMRC for guidance but we’re finding a long turnaround time, often 28 days, and that doesn’t help the chain if someone is moving house.”

HMRC countered by saying: “All reliefs are clearly signposted on stamp duty land tax returns. Our ‘ready reckoner’ provides a guide only.”

Any homebuyers who think that they might have overpaid their stamp duty can claim a refund via the government’s website, www.gov.uk.