For some reason you applied 10 to C5 and C25 when the corresponding values in A5 and A25 are less than 10. When I change them to what they should be (2.70 and 7.50, resectively) then the manual math is 12 as per my formula result.