Calculating this would be similar to calculating frames per second (or the exact same as). I have no clue how to calculate that but I know the concept behind it. :D
1) compile your code to an assembler source,
2) find latency of every instruction from the processor's user manual (they may often be ranges instead of fixed values, since the exact time depends on many factors, for example cache in case of memory accesses),
3) sum everything, convert to seconds and you've done it.
otherwise:
1) add some kind of time measuerment before and after the loop,
2) execute the program a few times,
3) calculate average.