Here is a simple subnet calculator I created from scratch using python. The subnet calculator uses a method called ANDing. ANDing calculates a network address by converting a given IP address and subnet mask to their binary equivalents. Once this is done, we can calculate things like range, from first address to last address, broadcast address and the total number of available hosts. If you'd like to learn more about how ANDing works check out this site.
Interested in seeing how this app works? Check out the code here. Check out the code here.