No, 401k withdrawals is not 'earned income'
Your earned income for 2018 is $3000.
Normal contributions to a Roth IRA or Traditional IRA can only occur during that tax year up through the tax filing deadline (April 15) in the following year (2019). If you meant 2019 earned income is $3000, then you have until the new tax deadline of July 15, 2020 due to COVID-19.
Back to what is earnedconsidered income for IRA or more specifically compensation:
From: https://www.irs.gov/credits-deductions/individuals/earned-income-tax-credit/earned-incomehttps://www.irs.gov/publications/p590a#en_US_2019_publink1000230355
There are two ways to get earned income:Compensation for Purposes of an IRA
You work for someone who pays you
or
You own or run a business or farm
Cashing out of a 401k would be in the same category as getting pension money so not earned income.
- wages, salary, etc.
- commissions
- self employment income
- taxable alimony and separate maintenance
- non-taxable combat pay
Examples of income that are not earned income:What Isn’t Compensation?
- Pay received for work while an inmate in a penal institution
- InterestEarnings and dividendsprofits from property, such as rental income, interest income, and dividend income.
- PensionsPension or annuitiesannuity income.
- Social securityDeferred compensation received (compensation payments postponed from a past year).
- Unemployment benefitsIncome from a partnership for which you don’t provide services that are a material income-producing factor.
- AlimonyConservation Reserve Program (CRP) payments reported on Schedule SE (Form 1040 or 1040-SR), line 1b.
- Child supportAny amounts (other than combat pay) you exclude from income, such as foreign earned income and housing costs.
Cashing out of a 401k would be in the same category as getting pension money so not earned income.