When dealing with division between large numbers, We need to remember the quotient is turned into 'float' but float does not support such large numbers. Therefore, you need to convert 'float' to 'int' first and then do division. One of the trick is using '//' operator. For example, 10//3 output 3, 10//4 outputs 2. Source : Hadling very large numbers in Python