Social calculus