We propose a functional calculus which allows one to apply functions to the matrix anti-commutator/commutator operator. The calculus is introduced in a straightforward manner if the operators act on symmetric matrices, and it leads to a coordinate-free version of Daleckii--Krein formula. In this sense, the proposed calculus provides symbolic formulae for the derivatives of matrix-valued functions that are explicit and easy to use. We discuss several applications of the newly introduced calculus