Let a, a1 , … , ad be positive integers, m1 , … , md nonnegative integers, and z1 , … , zd complex numbers. We study expressions of the form
Sumk mod a Productj=1,…,d cot(mj) pi ( k aj / a + zj ) .
Here the sum is taken over all k mod a for which the summand is not singular. These Dedekind cotangent sums generalize and unify various arithmetic sums introduced by Dedekind, Rademacher, Apostol, Carlitz, Zagier, Berndt, Meyer, Sczech, and Dieter. Generalized Dedekind sums appear in various areas such as analytic and algebraic number theory, topology, algebraic and combinatorial geometry, and algorithmic complexity. We prove reciprocity laws, Petersson-Knopp identities, and computability statements for the Dedekind cotangent sums.