miscalculate

To figure something out wrong, especially in math or planning.