This page shows the steps for the prime factorization of an integer. It uses the straightforward approach of trial division – testing odd numbers up to the square root of the number being factored.

Integers that can be factored are limited to 9007199254740992 (253) – the largest integer that can be represented exactly in JavaScript using 8 byte IEEE floating-point numbers.

A number that takes a long time to factor is 9007199254740931 – it has two large factors. A number that takes a very long time is 9007199254740881 – it's the largest prime less than 253.