mIRC is 32bit and the $calc function is based on that. That means you can only use numbers up to 32bit in size. Anything larger won't work correctly.
It appears that mIRC stores numbers as 64-bit (double) floating point numbers.
If that's a correct guess, then integer values will only work reliably up to approximately 15 decimal digits (which is significantly more than a 32-bit integer).
So basically, darkman2012, stick to numbers that are 15 digits or less and you will be fine.