SEP Calculation

if i am self employed, is the maximum SEP calculated on the total 1099 or after all business deductions?