
593 F.3d 1337 (2010)
Brian Alan BLAKLEY (d/b/a TCS), Plaintiff-Appellee,
v.
UNITED STATES, Defendant-Appellant.
No. 2009-5047.
United States Court of Appeals, Federal Circuit.
January 27, 2010.
*1338 Robert G. Nath, Robert G. Nath, PLLC, of McLean, VA, argued for plaintiff-appellee.
Teresa T. Milton, Attorney, Appellate Section, Tax Division, United States Department of Justice, of Washington, DC, argued for defendant-appellant. With her on the brief were John A. DiCicco, Acting Assistant Attorney General, and Thomas J. Clark, Attorney.
Before MAYER, PLAGER, and DYK, Circuit Judges.
DYK, Circuit Judge.
Defendant United States appeals from a decision of the Court of Federal Claims awarding plaintiff Brian Alan Blakley (d/b/a TCS) ("Blakley") $10,732.00 in attorneys' fees pursuant to Internal Revenue Code ("I.R.C.") § 7430. In finding Blakley entitled to an award of fees, the Court of Federal Claims determined that the position of the United States in an underlying tax refund proceeding was not substantially justified.
*1339 On appeal, the United States contends that the Court of Federal Claims erred in finding that the position of the United States was not substantially justified. We agree, and, accordingly, we reverse.

BACKGROUND
Blakley holds a license from the Bureau of Alcohol, Tobacco, Firearms and Explosives ("ATF") as a manufacturer of firearms. In December 2003, Blakley manufactured two allegedly similar Model AR16 firearms with serial numbers "ATF0001" and "0000001." The latter one is the primary subject of this case.
The I.R.C. imposes a $200 transfer tax on the transfer of "machine guns" with certain exceptions. See National Firearms Act ("NFA"), Pub.L. No. 73-474, § 3, 48 Stat. 1236 (1934) (current version at I.R.C. § 5801 et seq.); I.R.C. § 5811(a). On or around December 21, 2003, Blakley submitted ATF0001 to the ATF with a request that ATF determine that the firearm was not a machine gun and thus fell outside the scope of I.R.C. § 5811(a).
While Blakley's first request was still pending, on May 14, 2004, Blakley filed an Application for Tax Paid Transfer and Registration of Firearm ("Form ATF 4") with the ATF for his other Model AR16 firearm, serial number 0000001. Although Blakley described the firearm on Form ATF 4 as a "machine gun," he stated in a footnote that it was "subject to Firearms Tech. Branch Determination," i.e., the determination requested with respect to ATF0001. The form also stated that the firearm had been transferred to another firearms manufacturer, AWE Technology, Inc. ("AWE"). Both Blakley and AWE held special occupational taxpayer status under the NFA, I.R.C. § 5801 et seq. Under I.R.C. § 5852(d), the transfer was exempt from the $200 NFA tax because it was a transfer between special occupational taxpayers. However, Blakley did not indicate on Form ATF 4 that he was claiming this exemption. Along with the form, Blakley submitted payment for the $200 tax.
The ATF subsequently informed Blakley that it had classified firearm ATF0001 as a machine gun. Blakley filed a claim for a refund of the $200 transfer tax that he had paid on his other firearm, 0000001, asserting that it was not a "machine gun" and therefore the transfer of the firearm to AWE was not a taxable transfer of a machine gun. After the ATF denied this refund claim on the ground that its classification had been correct, Blakley filed suit against the United States in the Court of Federal Claims in November 2006 seeking a refund of the $200 federal tax. Blakley again alleged that the firearm transferred to AWE was not a machine gun and therefore was not taxable under I.R.C. § 5811. The United States responded that Blakley was not entitled to a refund because the weapon had not been misclassified. Neither party raised the issue of whether the tax exemption for transfers between special occupational taxpayers applied.
On June 28, 2007, government counsel wrote to notify Blakley that he was entitled to a refund of $200, plus interest, because the transfer had been eligible for the tax exemption for transfers between special occupational taxpayers. Although the United States requested that Blakley execute a stipulation for dismissal of the case, he refused to do so. The United States then filed a motion for entry of judgment for the amount sought in Blakley's complaint, which the Court of Federal Claims granted on July 13, 2007. Blakley filed a motion to vacate the court's order, claiming that the government had not conceded his case because it had not conceded that his firearm was not a machine gun under the NFA. The Court of Federal *1340 Claims denied his motion and entered judgment in his favor. On appeal, we affirmed, rejecting the taxpayer's contention that the refund award was unauthorized because the machine gun issue had not been resolved. Blakley v. United States, 280 Fed.Appx. 968, 969 (Fed.Cir. 2008).
Thereafter, Blakley sought an award of attorneys' fees under I.R.C. § 7430 and under the Equal Access to Justice Act ("EAJA"), Pub.L. 96-481, § 203(a)(1), 94 Stat. 2321 (1980) (codified as amended at 5 U.S.C. § 504; 28 U.S.C. § 2412). The Court of Federal Claims then granted, in part, Blakley's motion for an award of attorneys' fees pursuant to I.R.C. § 7430 in the amount of $10,732, finding that the government's position was not substantially justified because the transaction between Blakley and AWE was exempt from the NFA tax. Memorandum Opinion and Final Order Regarding Attorney Fees and Costs, Blakley v. United States, 85 Fed.Cl. 360, 372-73, 376 (2008) ("Final Order").[1] The court rejected Blakley's additional claim that the EAJA applied to this proceeding, finding that Congress intended for I.R.C. § 7430 to supplant the EAJA for attorneys' awards whenever § 7430 applied. Final Order, 85 Fed.Cl. at 370-71. The court entered judgment in favor of Blakley on the same day. Judgment, Blakley v. United States, 85 Fed.Cl. 360 (2008).
The United States timely appealed, and we have jurisdiction under 28 U.S.C. § 1295(a)(3).

DISCUSSION
Assuming that Blakley was otherwise a prevailing party because the court ordered the United States to pay Blakley $200, an award is permissible only if the government's position was not substantially justified.[2] The central question on appeal is whether the Court of Federal Claims erred in finding that the position of the United States was not substantially justified. The Court of Federal Claims based its decision to award attorneys' fees on its finding that: "The ATF's refund denial was in error and the Government's decision initially to defend that error in litigation was not `substantially justified,' albeit that decision subsequently was corrected." Final Order, 85 Fed.Cl. at 372-73. The United States contends that the Court of Federal Claims erred in finding that the government's position in the tax refund proceeding was not substantially justified.
Section 7430 defines the "position of the United States" with reference to judicial and administrative proceedings.[3]*1341 A 1985 amendment to the EAJA, using somewhat different language, states that the "position of the United States" means,
in addition to the position taken by the United States in the civil action, the action or failure to act by the agency upon which the civil action is based; except that fees and expenses may not be awarded to a party for any portion of the litigation in which the party has unreasonably protracted the proceedings. . . .
Pub.L. No. 99-80, § 2(c)(2)(B), 99 Stat. 183, 185 (1985) (codified as amended at 28 U.S.C. § 2412(d)(2)(D)). In the context of EAJA claims, we have held that the "position of the United States" in judicial proceedings refers to the United States' position "throughout the dispute, including not only its litigating position but also the agency's administrative position." Doty v. United States, 71 F.3d 384, 386 (Fed.Cir. 1995); see also Gavette v. Office of Pers. Mgmt., 808 F.2d 1456, 1467 (Fed.Cir.1986) ("[I]t is now clear that the position of the United States includes the position taken by the agency at the administrative level."). Because of the different language in § 7430, the government argues § 7430 makes clear that, where attorneys' fees are sought for judicial proceedings, the government's position is defined solely by its litigating position in court. The Court of Federal Claims read the language of § 7430 differently, apparently finding that there was no difference between the EAJA formulation and the § 7430 formulation. We need not decide that question here because we conclude that both the United States' litigating position in court and the ATF's position at the agency level were substantially justified.
The key here is that Blakley's claim for refund to the ATF did not mention the exemption for special occupational taxpayers. The refund claim was based solely on the machine gun issue; Blakley deliberately chose not to assert the exemption and indeed urged that the refund on that basis was improper.[4]
Just as with refund requests submitted to the Internal Revenue Service ("IRS"), the ATF is only required to consider theories asserted by the taxpayer. Under the statute, a refund may be allowed only if the taxpayer files a timely administrative claim for refund "according to the provisions of law in that regard, and the regulations of the Secretary established in pursuance thereof." I.R.C. § 7422(a). The relevant regulations clearly state that claims for tax refunds

must set forth in detail each ground upon which . . . refund is claimed and facts sufficient to apprise the appropriate [Alcohol and Tobacco Tax and Trade Bureau] officer of the exact basis thereof. . . . A claim which does not comply with this paragraph will not be considered for any purpose as a claim for the refund. . . .
27 C.F.R. § 70.123(b)(1) (2006) (emphasis added).[5] In interpreting similar language *1342 for claim refund requests to the IRS, courts have determined that the agency is only required to consider the grounds for refund asserted by the taxpayer. Charter Co. v. United States, 971 F.2d 1576, 1579 (11th Cir.1992). And when a taxpayer's refund claim is denied, the taxpayer is limited in subsequent litigation to the grounds contained within the refund claim by the variance doctrine. See Computervision Corp. v. United States, 445 F.3d 1355, 1363 (Fed.Cir.2006); Charter, 971 F.2d at 1579 (explaining that only "grounds fairly contained within the refund claim" may be raised in a refund suit); Edwards v. Malley, 109 F.2d 640, 645 (1st Cir.1940) (discussing how "taxpayer in suing is confined to the scope of the grounds for refund asserted in the claim"). The purpose of the variance doctrine is "to prevent surprise and to give adequate notice to the [government] of the nature of the claim and the specific facts upon which it is predicated" so as to allow administrative investigation. Computervision, 445 F.3d at 1363. Hence, the action of the government here is to be judged solely by the ground for refund that the taxpayer asserted before the agency. Because Blakley's sole basis for seeking refund was that, in his view, the firearm was misclassified as a machine gun, the justification of the government's position must be solely determined with regard to that argument.
Neither the ATF nor the United States in the course of litigation ever took the position that Blakley was not entitled to the exemption for special occupational taxpayers. Rather, their position was that Blakley was not entitled to a refund because the firearm was a machine gun. Blakley never claimed and indeed the Court of Federal Claims never found that the United States' litigation position before the Court of Federal Claimsnamely, that the gun in question was a machine gun subject to the taxwas not substantially justified. Moreover, the ATF took only one action that was judicially contested: it denied Blakley's claim for a refund based on its conclusion that the firearm at issue was a machine gun. Because the government never took the position that Blakley was not entitled to the exemption for special occupational taxpayers, its actions cannot be the basis for an award of attorneys' fees.
We conclude that neither the ATF's action in denying the refund on the basis that the firearm had not been misclassified nor the government's action in defending the denial of the refund on the same grounds was without substantial justification. We therefore hold that the Court of Federal Claims erred in granting Blakley attorneys' fees under I.R.C. § 7430, and we reverse.[6]
REVERSED
NOTES
[1]  Section 7430(a) of the I.R.C. states:

In any administrative or court proceeding which is brought by or against the United States in connection with the . . . refund of any tax . . . under this title, the prevailing party may be awarded a judgment or a settlement for . . . reasonable administrative costs incurred in connection with such proceeding within the Internal Revenue Service, and . . . reasonable litigation costs incurred in connection with such court proceeding.
I.R.C. § 7430(a).
[2]  I.R.C. § 7430(c)(4)(B)(i) provides: "A party shall not be treated as the prevailing party in a proceeding . . . if the United States establishes that the position of the United States in the proceeding was substantially justified."
[3]  Section 7430 defines the "position of the United States" as

(A) the position taken by the United States in a judicial proceeding to which subsection (a) applies, and
(B) the position taken in an administrative proceeding to which subsection
(a) applies as of the earlier of
(i) the date of the receipt by the taxpayer of the notice of the decision of the Internal Revenue Service Office of Appeals, or
(ii) the date of the notice of deficiency.
I.R.C. § 7430(c)(7).
[4]  See Motion to Vacate Final Order, To Restore Case to Active Docket, or Alternatively, to Amend or Clarify Final Order, Blakley v. United States, No. 06-749T at 3 (Ct.Fed.Cl. July 13, 2007) ("Plaintiff did not claim . . . that his firearm . . . was exempt from the transfer tax under any provision of the NFA (including the exemption for transfers between special occupational taxpayers . . .), except for contending that the firearm was not subject to the tax since it was not a `machine gun' within the meaning of the NFA.").
[5]  Similar language appears in the IRS's regulations. See 26 C.F.R. § 301.6402-2(b)(1) (2005) (discussing how tax refund claims must "set forth in detail each ground upon which a credit or refund is claimed and facts sufficient to apprise the Commissioner of the exact basis thereof").
[6]  We need not address Blakley's assertions that EAJA governs fees in this case and allows fees for the administrative proceedings. Even if these assertions were correct, Blakley would not be entitled to fees under EAJA since EAJA, like § 7430, incorporates a without substantial justification requirement. 28 U.S.C. § 2412(d)(1)(A).
