Your earned income credit is based upon the amount of income you earned by working. There is a formula based on your filing status, number of dependents, amount of income earned etc. that is used to calculate your EIC.
The basic EIC works on a "bell curve," rising as a worker's wages rise reaching a maximum when annual earnings are between $14,000 and $18,350 (Single with 2 or 3 children 2018) and then declining gradually until it phases out altogether. If your income is on the up slope of the EIC curve more earned income will increase your EIC but if your income is on the down slope, more income (of any kind) will reduce you EIC. The “upslope" on the EIC curve is very steep; basically for every $3 you earn, the government gives you another dollar. See the curve (graph) at:
The earned income credit is first calculated (actually looked up in a table) on your earned income then it is calculated on your total income (AGI). You get the lesser of the two calculated EIC numbers. See the 2018 EIC table at: