Union leaders have accused rail companies of putting profits before passengers by not always offering the cheapest fares on ticket vending machines (TVMs) in stations.
TVMs were introduced to cut queues and make the process faster and easier and there are now 2,240 in use across the UK.
But the BBC has found some stations where the TVMs will not allow people to buy cheaper tickets during peak times, even though the trains they are valid on may be leaving within half an hour.
One example found was at Paddington Station in London.
The 18:45 London to Bristol Parkway is an off-peak train, but the machines at the station would not sell an off-peak ticket for the journey before 18:30.
However, the cheaper fare was available on request at the ticket office.
First Great Western said this was down to an error on the machine, which did not allow off-peak tickets to be sold as early as they should have been.
''This issue was resolved as soon as we became aware of it, and we have reviewed all other machines at the station," said a spokesman.
"We'll be double-checking other machines across our network over the coming weeks.''
The rail watchdog Passenger Focus says it has written to the rail regulator because it has identified similar problems with other train companies.
It has also found that when people do know that cheaper fares are available, they are forced to wait until they pop up on the machine.
Passenger manager Jocelyn Pearson said it was a real problem, especially during the transition time from peak to off-peak periods.
"People go to the ticket machines and they don't have enough time to get to the platform and get the train they want," she said.
''The trouble with the ticket vending machines is that they can't give enough information.
"It's not that they aren't letting you buy the cheapest ticket, it's that they haven't got the information to help you," she added.
At Paddington, an off-peak return is valid on the 18:45 train from London to Bristol Parkway costing £59.
But the cheapest return ticket available on the machine at Paddington before 18:30 was the standard open return costing £159.
The ticket office was able to sell the cheaper ticket before 18:30.
Meanwhile at Marylebone station in London, a super off-peak return ticket from London to Birmingham is valid on the 20:00 costing £19.50.
However the cheapest ticket available on the ticket machine at the station at just before 19:00 was an off-peak return, costing £31.90.
The transport union TSSA said it was a scandal that people were being forced to buy more expensive tickets than they need.
"Aggression towards staff is never acceptable but it's understandable when passengers are faced with the frustrations of using these machines," said Manuel Cortes, the union's deputy general secretary.
"We think it's another example of the train companies putting profits before passengers. What people really want is to speak to a real person.''
The Association of Train Operating Companies (ATOC) said there were 1.27 billion rail journeys made each year in the UK, and a tiny proportion might be affected by the ticketing problem.
"Passenger Focus's own figures published just this week show that more than seven out of 10 passengers are happy with ticket buying facilities at stations," an ATOC spokesperson said.
"Train operators always offer passengers the best value fare for their journey and don't want to mislead passengers by offering fares that are not valid for travel at the time of purchase.
"We will, however, look at this issue with train companies to see whether any changes could be made that would benefit passengers," the spokesperson added.