I'm using IE11 and using emulation in developer tool to change document mode to 5. Now I want to get current zoom level, I change it in setting of IE.
I'm using this code to get zoom level
zoom = document.documentElement.offsetWidth / $(document).width();
But it only get zoom out (zoom level <= 100%). If zoom level > 100%, zoom = 1.

there is a library for this: https://github.com/tombigel/detect-zoom
Unfortunately, it does not work well currently in Desktop browsers. But if you look at the code it might help.
The short version is that right now this is very difficult. Why are you trying to detect zoom?