Staple foods from bread to potatoes, onions, milk and meat may be in shorter supply than usual this year and prices to consumers may have to rise, farmers have said, as they count the cost of the two-month drought and heatwave across the UK.

There will be little respite from the hot weather in many areas of the country, even as thunderstorms and heavy rains spread from the east, as farmers have seen their crops wilt, their fields parched and livestock struggle in the extreme conditions.

Although it is too early to say precisely what price rises may come, the National Farmers’ Union said farmgate prices were likely to increase. Retailers will have to decide whether to pass such rises on to consumers.

Anand Dossa, economist at the NFU, said early indications were that harvesting for staples such as grains was taking place early, but it was too early to say exactly what the yields would be. “These are challenging conditions, and we would expect to see an effect,” he said. He added that sheep meat production was down 16% this year.

Following the year’s wet and cold spring, many livestock farmers have had to dip into their stores of winter feed early, said Robert Martin, who keeps a 120-strong herd of dairy cattle near Carlisle. “Milk yields are down because of the conditions,” he added. “People are coming to market early with cattle because they can’t afford to carry passengers.”

Tim Mead, of the organic dairy company Yeo Valley, said a 10% reduction in milk yield was common but “there is still plenty of milk around”. Many farmers were still in debt as a result of low prices in the last few years, however, and this year’s conditions would hurt them further. George Dunn, chief executive of the Tenant Farmers Association, said confidence in the beef market had also “taken a hit”, the result of lower supplies of fodder and very little grass. “Store markets are well down in price, which may lead to shortages into next year,” he warned.

Another problem for livestock farmers is the lack of straw, used for bedding. “Straw length is short because of the impact of the hot weather on the growth of wheat and barley, and straw was already in desperately short supply because of the previous year’s wet harvest,” said Zoe Davies, chief executive of the National Pig Association. “We are encouraging anyone who can to bale straw to try to make more available. The last thing we want is for the large number of our members reliant on straw to be outbid on it by subsidised straw-burning [power] plants, which will only exacerbate the issue.”

Potatoes are watered as another dry summer day draws to a close in Jedburgh in the Scottish Borders. Photograph: Chris Strickland/Alamy

Jack Ward, chief executive of the British Growers Association, warned of impacts across the market for vegetables. “As a broad generalisation, volumes [of crops harvested] will be down and for the majority of crops costs will be up.”

The next few months would be crucial, he said. “Brassicas, such as broccoli and cabbage, are down in volume. With salad, growers are having difficulty just keeping the plants alive. But there is still time for potatoes to bulk up, and onions,” he said. “That will depend on the weather in August and September.”

Many farmers are having to harvest crops, particularly grain, early this year because the hot conditions have caused them to ripen sooner, but without time to “bulk up” to their usual size. This is likely to depress the yield on such crops, which could in turn raise prices.

The widespread nature of the heatwave across Europe and beyond would mean retailers cannot simply pick up cheaper food elsewhere to put on their shelves, said Liz Bowles, head of farming at the Soil Association. “Many food exporter regions around the globe are being affected, so we could see pressure on prices for consumers,” she said.

Farm economics are also much affected by the weak pound, added Dossa, which he called a “double-edged sword”, because while it makes exports more profitable, it raises the cost of inputs such as feed, fuel and fertiliser. Meanwhile, the uncertainty over Brexit has resulted in a slump in confidence among farmers, with the NFU’s latest survey in April showing confidence at its lowest in eight years. Low confidence translates to lower investment, which could have a long-term dampening effect on productivity.

Parched soil in a wheat field in Suffolk. Photograph: Graham Turner/Alamy

Farming leaders have warned that thousands of rural families may face hardship as a result of this year’s conditions. Malcolm Thomas, chairman of the Royal Agricultural Benevolent Institution, which provided £2m in help to farming families last year, said: “I envisage a busy autumn and winter [for us], with many livestock farmers already forced to feed winter rations to their stock. Having to buy more feed will quickly drive up overheads. We’ve not seen weather like this in decades, and it’s worth remembering it comes hot on the heels of a long cold winter and a particularly wet spring, which resulted in floods in many areas.”

Farmers are used to dealing with the vagaries of the weather, but the long winter and cold spring, followed by the heatwave, has produced a meteorological double whammy that has sent many reeling. That would have been bad enough, but the added effects of Brexit are creating turmoil. Thomas said: “Reacting to what the elements throw at you is part of a farmer’s life, and most accept that. However, extreme weather creates extreme challenges that make it impossible to plan for anything. There’s already tremendous uncertainty about the future due to Brexit and the implications of a possible no deal outcome.”