Leibniz constructed the first mechanical calculator capable of multiplication and division. Independently of Isaac Newton he 'invented' the infinitesimal calculus (and also the notation df/dx still used.) He also introduced the binary number system that is being used in all computers nowadays.
His philosophical contribution to metaphysics is based on the Monadology, which introduces Monads as "substantial forms of being", which are akin to spiritual atoms, eternal, indecomposable, individual, following their own laws, not interacting ("windowless") but each reflecting the whole universe. In the way sketched above the notion of a monad solves the problem of the interaction of mind and matter that arises in Rene Descartes' system, as well as the individuation that seems problematic in Baruch Spinoza's system, which represents individual creatures as mere accidental modifications of the one and only substance. The "theodicee" tries to justify the apparent imperfections of the world by claiming that it is optimal among all possible worlds. It must be the best possible and most balanced world, because it was created by a perfect God.