Annual leave and bank holiday

Hello,

How do I calculate annual leave for a prat-time employee who works variable hours every week?  For example: if the total number of hours worked since Jan are 500 hours, would the calculation look like this:

500 hours x 8% = 40 hours / 7 hours = 5.71 days

So I would pay them for 40 hours at their hourly rate and they would take 6 days annual leave, is this correct?  I am confused about the 7 hours, not sure if this is correct.

For the Bank holiday calculation i am taking 20% of the  average of all hours worked during the 5 weeks preceding the BH, is this correct?

Thank you

Pallavi