Algebraic calculation