calculate expenses total