20 CFR § 404.1571 - General.
The work, without regard to legality, that you have done during any period in which you believe you are disabled may show that you are able to work at the substantial gainful activity level. If you are able to engage in substantial gainful activity, we will find that you are not disabled. (We explain the rules for persons who are statutorily blind in § 404.1584.) Even if the work you have done was not substantial gainful activity, it may show that you are able to do more work than you actually did. We will consider all of the medical and vocational evidence in your file to decide whether or not you have the ability to engage in substantial gainful activity.