We present a calculus that is well-adapted to homogeneous quadratic algebras. We define this calculus on Koszul cohomology – resp. homology – by cup products – resp. cap products. The Koszul homology and cohomology are interpreted in terms of derived categories. If the algebra is not Koszul, then Koszul (co)homology provides different information than Hochschild (co)homology. As an application of our calculus, the Koszul duality for Koszul cohomology algebras is proved for any quadratic algebra, and this duality is extended in some sense to Koszul homology. So, the true nature of the Koszul duality theorem is independent of any assumption on the quadratic algebra. We compute explicitly this calculus on a non-Koszul example.