The taxman could owe up to £2bn in stamp duty repayments because the online calculator supplied by HMRC is not accurate.

The calculator, which can be accessed on HMRC’s website, does not take certain potential discounts into account.

These discounts can apply if the property has a “granny annexe”, a commercial building or farmland attached to it. They could be worth thousands, and when not factored in, this can lead to large overpayments.

One firm of tax advice specialists told the Times that it had experienced a 400% increase in claims for refunds in the past three months alone. The firm said that HMRC was dealing with around 900 cases per month.

The main reason given was the flawed HMRC calculator. It was not only being used by home buyers but also by solicitors, who were using the tool to calculate tax bills for clients.

The firm said that one in six calculations could be wrong, adding up to a total potential repayment of around £2bn.

HMRC disputed the claims, however. It said that most people paid the correct amount, and stated that the online calculator was only supposed to be used as a guide, not a means to calculate the final amount of stamp duty owed.

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

According to the Times, solicitors complained that they did not have the required expertise to calculate the tax correctly. They said that HMRC essentially treated them like accountants and so they did often rely on the calculator.

The main issue is that the calculator does not allow for properties being classed as mixed use.

Homes that are purely for domestic use and are worth more than £1.5m attract a stamp duty of 12%, while mixed-use properties are taxed at just 5%.

This can make a substantial difference, and the advice firm gave an example of a property that had been bought by a couple for £1m. The calculator, which treated it as a domestic property, gave a figure of £43,750. Because the property had a field that had been rented by a farmer, however, a commercial discount should have been applied. That would have put the bill at £39,500.

Another example was a woman who bought a block of five flats for £500,000 and paid stamp duty of £14,500. She should have received a discount for multiple dwellings, which would bring the bill down to £8,400.

Sarah Dwight, a solicitor on the Law Society’s Conveyancing and Land Law Committee, told the Times: “A lot of the calculators are not up to it. We write to 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.”

According to the Times, stamp duty has become an important source of revenue for the Treasury. Last year, it raised £13bn, an increase of 95% compared to five years ago.