Calculating Traditional IRA contribution amount for selfemployed question

If my selfemployed profit is $3,000 (as an example) and I pay $100 (as an example) for “onehalf of selfemployment tax” – then what would be my maximum allowed contribution amount to a Traditional (Ordinary) IRA (not SEP or SIMPLE, etc.). Would it be $3,000 or $2,900 ($3,000$100)?

If your selfemployed net earnings = $3000, and no other contributions to retirement plans have been made on your behalf, then your maximum contribution – using your hypothetical numbers, @Richard – would be $2900 (income minus 1/2 of your SE Tax).
Using real numbers, half of the selfemployment tax would actually be:
$3000 x 6.2% Social Security = $186.00
$3000 x 1.45% Medicare = $43.50$3000  $229.50 = $2770.50
From the IRS:
Selfemployment income. If you are selfemployed (a sole proprietor or a partner), compensation is the net earnings from your trade or business (provided your personal services are a material incomeproducing factor) reduced by the total of:
 The deduction for contributions made on your behalf to retirement plans, and
 The deduction allowed for the deductible part of your selfemployment taxes.
Compensation includes earnings from selfemployment even if they aren’t subject to selfemployment tax because of your religious beliefs.
For 2017, the most that can be contributed to your traditional IRA generally is the smaller of the following amounts:
 $5,500 ($6,500 if you are age 50 or older).
 Your taxable compensation (defined earlier) for the year.

@kohlspowrshopper Thanks, I will calculate the exact “onehalf of selfemployment tax” when I file. So for an ordinary IRA (I am not talking SEP or SIMPLE or other similar plans, such as Solo 401(k), Keogh, etc.) my max deduction is Net Profit  “onehalf of selfemployment tax”, and I think the rational for this could be that “onehalf of selfemployment tax” is already deducted once from Adjusted Gross Income (AGI) prior to IRA deduction?
Also, another BIG confusion is between 2 terms Net Profit and Net Earnings (Line 6 of Section B—Long Schedule SE (Part I  SelfEmployment Tax)). Net Earnings is obtained by multiplying Net Profits by 0.9235. So your calculation for $3,000 Net Profit should be amended as follows:
$3,000 x 0.9235 = $2,770.50 (Net Earnings)
$2,770.50 x 6.2% Social Security = $171.771
$2,770.50 x 1.45% Medicare = $40.17225
Onehalf of selfemployment tax = $211.94
So my max IRA deduction is NET PROFIT  “Onehalf of selfemployment tax” and not NET EARNINGS  “Onehalf of selfemployment tax”. I this a correct understand of the terms?

If you’re self employed, can’t you also put in like a billion dollars into the 401K?