ROI in digital marketing is calculated by dividing the net profit from the campaign by the total campaign costs, then multiplying by 100.