Your wages that you earn while working as a resident doctor while in medical school are probably not subject to social security withholding taxes. The issue, however, will be decided by the US Supreme Court in the Mayo Foundation v US case, of which the Court has granted certiorari. That means that the US Supreme Court has agreed to decide the matter.
The Mayo case has deviated from other Federal Appellate cases in that the IRS won a victory, claiming that the student exclusion from the Federal Insurance Contributions Act (FICA) under 26 USC 3121(b)(10), did not apply to medical residents. Alternatively, the Second Circuit Court of Appeals, in US v Sloan Kettering Cancer Centers, and the Eleventh Circuit Court of Appeals in US v Mt Sinai, ruled that the wages were exempt.
The Federal District Court for the Southern Division, in Center for Family Medicine, and the Univ of SD v US, ruled that the wages were exempt and awarded partial attorneys fees under 26 USC 7430 to the school employers. Under 26 USC 7430, a party's recovery of attorney's fees is not allowed if the Government can establish that the US position in the proceeding was substantially justified.
Although the Government's argument was not completely struck down, the assertion in its first motion for summary judgment, that, as a matter of law, medical residents can never fit within the "student exception" exempting them from payment of FICA taxes conflicted with rulings in the Eighth Circuit Court of Appeals. The law in the Eighth Circuit clearly prohibits such a bright line rule see Minnesota v Apfel.
NEW TREASURY REGULATIONS:
New Treasury Regulations, issued under 31.3121(b)(10), attempt to redefine what a "student" is under the law by adding a work hour requirement, in an attempt to nullify the exemption for medical residents.
A new case, filed in the US District Court WD in Texas last September, representing the University of Texas School System, challenges the Service regarding this issue and the amended regulations (No. A09CA665 SS). Accordingly, the complaint purports that the amended Treasury Regulations are inconsistent with the meaning of 26 USC 3121, which clearly provides for an exception for students. The regulations, therefore, are invalid under the law ( 26 USC 7805).