The figures, collated by the Scottish Conservatives via a series of Freedom of Information requests, reveal a total overtime bill of nearly £230 million between 2017/18 and 2021/22.
Over the past five financial years, 10,867,979 of overtime hours have been undertaken by NHS staff, according to the data.
During the same period, the amount spent on overtime has increased by nearly 57.1 per cent from nearly £36.3 million to almost £57m.
Overall, 29,420 NHS staff worked a total of 1.9 million extra hours in 2017/18 at a cost of £36.3m.
By 2021/22, this had risen to 45,047 staff working 2.5 million extra hours, at a cost of £57m.
The Conservative party claims the figures “underestimate” the extent of the reliance on staff working extra hours to “plug the workforce gaps” as they do not include unpaid overtime.
The data does not include figures from NHS Forth Valley as the health board failed to provide the party with figures.
Dr Sandesh Gulhane, Scottish Conservative shadow health secretary, said: “These staggering figures highlight the enormous toll the SNP’s mismanagement of the NHS is taking on heroic, but shattered frontline staff.
“Most of the crises in Scotland’s health service stem from personnel shortages – whether it’s the enormous backlogs patients face for treatments or operations, excessive delays to be seen in A&E wards or difficulties booking a GP appointment."
Dr Gulhane said the SNP needed to ensure more trained frontline staff came forward by implementing the Tories’ call to lift the cap on the number of funded places for Scottish students in medical-related courses at Scottish universities.
He said: “In nursing alone, there are over 6,000 vacancies in Scotland.
“The blame for this mess lies with the awful workforce planning of successive SNP health secretaries, which has left Scotland’s NHS on its knees.
“It’s a measure of the dedication and professionalism of frontline staff that they are willing to work extra hours to help patients – and, remember, these figures don’t include the huge amount of unpaid overtime staff undertake on a regular basis.
“But it’s not a sustainable or fair way to run our NHS, not least because it risks staff burnout.”
The number of nursing and midwifery vacancies has increased over the past year by 38.1 per cent to 6,209 whole time equivalent posts. The vacancy rate also increased to 8.7 per cent over the same period.
About 15,000 NHS workers left the service in the year to March — the highest number in at least a decade.
Total spend on agency locums and on nursing and midwifery agency/bank staff soared by 30 per cent in the year March 31 to £423m.
A Scottish Government spokesperson said: “NHS Scotland staffing is at record high levels and we are immensely grateful for the incredible efforts of all of our NHS and social care staff over the course of the pandemic.
“For context, in the last five years over 1.4 billion hours of work have been carried out in NHS Scotland, which would mean that overtime accounts for less than 0.8 per cent of the time worked.” The spokesperson added; “We will continue to do all we can to seek to alleviate those demand pressures and provide support for their wellbeing.”