26 USC 6211 - Definition of a deficiency

(a) In general 
For purposes of this title in the case of income, estate, and gift taxes imposed by subtitles A and B and excise taxes imposed by chapters 41, 42, 43, and 44 the term deficiency means the amount by which the tax imposed by subtitle A or B, or chapter 41, 42, 43, or 44 exceeds the excess of
(1) the sum of
(A) the amount shown as the tax by the taxpayer upon his return, if a return was made by the taxpayer and an amount was shown as the tax by the taxpayer thereon, plus
(B) the amounts previously assessed (or collected without assessment) as a deficiency, over
(2) the amount of rebates, as defined in subsection (b)(2), made.
(b) Rules for application of subsection (a) 
For purposes of this section
(1) The tax imposed by subtitle A and the tax shown on the return shall both be determined without regard to payments on account of estimated tax, without regard to the credit under section 31, without regard to the credit under section 33, and without regard to any credits resulting from the collection of amounts assessed under section 6851 or 6852 (relating to termination assessments).
(2) The term rebate means so much of an abatement, credit, refund, or other repayment, as was made on the ground that the tax imposed by subtitle A or B or chapter 41, 42, 43, or 44 was less than the excess of the amount specified in subsection (a)(1) over the rebates previously made.
(3) The computation by the Secretary, pursuant to section 6014, of the tax imposed by chapter 1 shall be considered as having been made by the taxpayer and the tax so computed considered as shown by the taxpayer upon his return.
(4) For purposes of subsection (a)
(A) any excess of the sum of the credits allowable under sections 24 (d), 32, 34, 35, and 53 (e) over the tax imposed by subtitle A (determined without regard to such credits), and
(B) any excess of the sum of such credits as shown by the taxpayer on his return over the amount shown as the tax by the taxpayer on such return (determined without regard to such credits),

shall be taken into account as negative amounts of tax.

(c) Coordination with subchapters C and D 
In determining the amount of any deficiency for purposes of this subchapter, adjustments to partnership items shall be made only as provided in subchapters C and D.