Here is a quick and dirty aid for calculating route summarization
JavaScript only uses signed 32-bit integers. Unsigned or 64-bit integers are required for IP Address processing. Therefore, the program will not summarize across the 127.255.255.255 — 128.0.0.0 boundary. But really, do you need that????
Here is a simple VLSM calculator

