*564Opinion by
Plaintiff, David K. Jenner, an inmate in the custody of the Department of Corrections (DOC), appeals from the district court judgment dismissing his complaint against defendants, certain officials of the DOC and the state attorney general. We affirm.
The record reveals the following facts. In his complaint, which he designated as a "petition for review/ mandamus relief under C.R.C.P. 106(a)(2) or 106(a)(4)," plaintiff essentially sought to challenge a DOC determination regarding the timing of his parole eligibility date under certain statutory provisions as being unconstitutional based on Apprendi v. New Jersey, 530 U.S. 466, 120 S.Ct. 2348, 147 L.Ed.2d 435 (2000), and Blakely v. Washington, 542 U.S. 296, 124 S.Ct. 2531, 159 L.Ed.2d 403 (2004).
Under the relevant statutory scheme, offenders are generally eligible for parole after serving fifty percent of their sentences, less any authorized earned time. See § 17-22,5-403(1), C.R.S.2006. However, offenders convicted of certain crimes, including certain sexual assault offenses, who have twice previously been convicted of a crime that would have been a crime of violence, are not eligible for parole until they have served seventy-five percent of the sentence imposed. See § 17-22.5-403(2)(a), (8), C.R.S.2006.
In his complaint, plaintiff alleged that the DOC applied the provisions of § 17-22.5-408(8) to his sentence, thereby extending his parole eligibility date to seventy-five percent of his sentence and effectively eliminating any credit for earned time and reducing any credit for good time. Plaintiff further asserted that the DOC's determination applying these statutory provisions to him unconstitutionally enhanced his sentence in violation of the sentence enhancement requirements of Apprendi and Blakely. On that basis, plaintiff alternatively sought mandamus relief pursuant to C.R.C.P. 106(a)(2) compelling the DOC to cease and desist from applying § 17-22.5-403(3) to him, or judicial review of the DOC's action pursuant to C.R.C.P. 106(a)(4).
Defendants moved to dismiss plaintiffs complaint pursuant to C.R.C.P. 12(b)(5) for failure to state a claim upon which relief could be granted. Plaintiff filed a response opposing defendants' motion, reiterating his arguments under Apprendi and Blakely, as well as asserting additional arguments challenging the DOC's action. We also note that plaintiff has never sought to amend his complaint, and that no evidentiary materials, such as affidavits or documents, were submitted with defendants' motion or plaintiff's response.
The district court summarily granted defendants' motion to dismiss for failure to state a claim upon which relief could be granted, and this appeal followed.
Assuming without deciding that C.R.C.P. 106 applies to DOC's parole eligibility determinations, we proceed to the merits of this appeal. Based on the record before us, we are not persuaded that the district court erred in dismissing plaintiff's complaint.
A motion to dismiss pursuant to C.R.C.P. 12(b)(5) tests the formal sufficiency of a complaint, which may be dismissed when it fails to state a claim upon which relief may be granted. In evaluating a motion to dismiss under C.R.C.P. 12(b)(5), a court must accept as true all averments of material fact, and the allegations of the complaint must be viewed in the light most favorable to the plaintiff. Rivera-Bottzeck v. Ortiz, 134 P.3d 517 (Colo.App.2006); Negron v. Gillespie, 111 P.3d 556 (Colo.App.2005).
In ruling on such a motion, a court may consider only the matters stated within the four corners of the complaint and must not go beyond the confines of the pleading. Verrier v. Colo. Dep't of Corr., 77 P.3d 875 (Colo.App.2003); Kratzer v. Colo. Intergovernmental Risk Share Agency, 18 P.3d 766 (Colo.App.2000). Because an appellate court is in the same position as the trial court in this regard, we must determine whether plaintiff has pleaded facts that, if true, are sufficient to support each claim asserted in the complaint. See Verrier v. Colo. Dep't of Corr., supra.
The premise of plaintiff's constitutional challenge is that the DOC illegally increased his sentence by applying § 17-22.5-408(2)(a) and (3) in calculating his parole eligibility date. We reject this premise. Contrary to *565plaintiff's argument, regardless of the extension of his parole eligibility date by the application of these provisions, the DOC has not increased his sentence, illegally or otherwise.
An offender released on parole has not thereby fully served the sentence imposed, but remains under legal or constructive custody for the full term of that sentence. See §§ 17-2-207(3), 17-22.5-402(1), C.R.S.2006; People v. Lucero, 772 P.2d 58 (Colo.1989) (parolee remains under sentence in legal custody); see also Meyers v. Price, 842 P.2d 229 (Colo.1992) (good time and earned time ered-its do not constitute service of sentence, but are used only in determining parole eligibility date).
Consequently, the DOC's actions affecting plaintiffs parole eligibility date have not altered the sentence imposed on him, and the constitutional sentence enhancement requirements of Apprendi and Blakely are irrelevant to the DOC's actions. Thus, because plaintiff stated no grounds calling into question the DOC's action, he was not entitled to relief under C.R.C.P. 106(a)(2) or 106(a)(4).
The judgment of dismissal is affirmed.
Judge TAUBMAN and Judge VOGT concur.