Bill Gates has funded genetic research into how to create the perfect cow — one that will produce more milk and be able to withstand temperatures beyond that of the average cow.

The Microsoft founder has invested $40 million (£28 million) in the Global Alliance for Livestock Veterinary Medicines (GALVmed), a non-profit organisation based in Edinburgh, Scotland, that conducts research into livestock vaccinations and genetics, the BBC reported.

Gates wants to help create the perfect cow that will produce as much milk as a European cow and be able to withstand heat as well as an African cow, according to The Times newspaper.

He said: “The impact per dollar we spend is super-high in this area. You can have a cow that is four times as productive with the same survivability.”

Although it’s unclear how exactly such cows will be created, Gates has previously proposed creating cows via artificial insemination.

His endowment, made through his philanthropic organisation the Bill and Melinda Gates Foundation, forms part of a larger investment which includes cash from the UK’s Department for International Development.

Gates is expected to deliver a speech in Edinburgh alongside UK International Development Secretary Penny Mordaunt later on Friday.

He told the BBC ahead of his visit of his excitement “to see how the UK’s leadership in research and innovation doesn’t just benefit Britain, but also saves and improves lives in the poorest parts of the world.”

Although climate scientists have warned that cows and dairy products can lead to further environmental degradation, Gates says they can help mitigate global poverty and starvation.

He said in a blog post last July: “While there are legitimate questions about whether the world can meet its appetite for animal products without destroying the environment, it’s a fact that many poor people rely on cattle for both nutrition and income.”