The lesser of 25% of your compensation / net income or $67k. SEP contributions also reduce the gross income. To correct your overcontribution, see Find, fix and avoid plan errors.
References:
I have the same issue. Per the regulations you quote, the person asking the question should not have any penalties associated with his SEP-IRA (made $240k, contributed $50k, which is less than the 25% threshold). But TurboTax seems to not differentiate between a SEP-IRA and a traditional IRA. How can we ensure the software identifies these contributions as a SEP-IRA and therefore not subject to contribution limit penalties?
Gross income is not used to calculate the deduction. Net income is used- after all expenses - including the retirement contribution. The person earlier did not say their net income.
The program knows the difference based on your entries and will verify that your net income supports the deduction. See Where do I enter my SEP IRA contributions?