delivered the opinion of the court:
Defendant, Randy Cook, pleaded guilty to theft over $300 (720 ILCS 5/16 — 1(a)(2)(A) (West 2006)) and unlawful possession of less than 15 grams of cocaine (720 ILCS 570/402(c) (West 2006)) in separately charged cases. In exchange for defendant’s guilty pleas, the State agreed to dismiss a third pending charge. The trial court sentenced defendant to two consecutive prison terms of 42 months and 3 years, respectively, awarding a total credit of 33 days for time spent in custody. Defendant appeals, claiming he is entitled to an additional 26 days of credit for time spent in custody for the third charge that was dismissed. We agree and modify the sentence to reflect an additional 26 days of sentence credit.
I. BACKGROUND
On November 16, 2007, in case No. 07 — CF—1997, the State charged defendant with theft, a Class 3 felony (720 ILCS 5/16— 1(a)(2)(A) (West 2006)) for using the victim’s bank card and, without authorization, withdrawing $400 from the victim’s bank account on November 2, 2007. While released on bond for that charge, on December 10, 2007, in case No. 07 — CF—2145, the State charged defendant with unlawful possession of less than 15 grams of cocaine, a Class 4 felony (720 ILCS 570/402(c) (West 2006)). On January 18, 2008, in case No. 08 — CF—120, the State charged defendant with aggravated criminal sexual abuse, a Class 2 felony (720 ILCS 5/12— 16(d) (West 2006)) for committing an act of sexual penetration on a minor on August 31, 2007.
In March 2008, defendant and the State entered into a plea agreement in all three pending cases. In exchange for defendant’s plea of guilty to theft over $300, the State agreed to cap its sentencing recommendation to four years in prison. In an open plea agreement, defendant also agreed to plead guilty to unlawful possession of cocaine. In exchange for his pleas, the State agreed to dismiss the aggravated-sexual-abuse charge. After admonishments, the court accepted defendant’s pleas as knowing and voluntary and ordered the preparation of a presentence-investigation report (PSI).
On April 7, 2008, the trial court sentenced defendant in case No. 07 — CF—1997 (theft over $300) to 42 months in prison with credit for 33 days for time spent in pretrial custody. In case No. 07 — CF—2145, the court sentenced defendant to a consecutive term of three years in prison without credit. This appeal followed.
II. ANALYSIS
Defendant failed to object to the trial court’s sentencing order during the hearing or in a postsentencing motion. Nevertheless, defendant’s procedural default is not fatal to our review because the statutory right to sentence credit is mandatory and can be raised for the first time on appeal. People v. Dieu, 298 Ill. App. 3d 245, 248, 698 N.E.2d 663, 665 (1998). Defendant has not forfeited his contention of error. The State concedes this point.
Defendant does not dispute the trial court’s calculation of sentencing credit for the 33 days awarded against the sentence imposed in case No. 07 — CF—1997. The calculation of the 33 days was set forth in the PSI. However, defendant does claim that the court erred in failing to award an additional 26 days between January 30, 2008, and February 24, 2008. On January 30, 2008, while defendant was released on bond in both of his 2007 cases, defendant was arrested and charged with aggravated criminal sexual abuse (his 2008 case). He remained incarcerated until March 5, 2008, when the court released him on his own recognizance upon the court’s acceptance of the plea agreement. On February 25, 2008, defendant surrendered his bond in both 2007 cases. Therefore, from that day forward, but not until, defendant was receiving simultaneous credit on all three of his charges. See People v. Arnhold, 115 Ill. 2d 379, 383, 504 N.E.2d 100, 101 (1987) (“[A] defendant who is out on bond on one charge, and who is subsequently rearrested and returned to custody on another charge, is not returned to custody on the first charge until his bond is withdrawn or revoked”). Between January 30, 2008, and February 24, 2008, defendant spent 26 days in custody for the offense filed in case No. 08 — CF—120.
Defendant argues that the language of section 5 — 8—7(c) of the Unified Code of Corrections (Unified Code) (730 ILCS 5/5 — 8—7(c) (West 2006)) applies to this situation and mandates the award of an additional 26 days of sentencing credit. Section 5 — 8—7(c) provides as follows:
“An offender arrested on one charge and prosecuted on another charge for conduct which occurred prior to his arrest shall be given credit on the determinate sentence or maximum term and the minimum term of imprisonment for time spent in custody under the former charge not credited against another sentence.” 730 ILCS 5/5 — 8—7(c) (West 2006).
The State argues defendant is not entitled to an additional 26 days of credit relating to case No. 08 — CF—120 because the State did not dismiss one charge in favor of a subsequent charge. The State claims, for that reason, section 5 — 8—7(c) is not applicable.
This case is factually similar to People v. Revell, 372 Ill. App. 3d 981, 993, 868 N.E.2d 318, 328 (2007), where this court awarded the defendant an additional two days of credit for time spent in custody on an unrelated dismissed charge. In Revell, the defendant pleaded guilty to predatory criminal sexual assault of a child in exchange for the State’s dismissal of other pending charges, including a charge of aggravated criminal sexual abuse filed in a separate case. Revell, 372 Ill. App. 3d at 983, 868 N.E.2d at 320-21. The defendant committed the predatory criminal sexual assault prior to his arrest for aggravated criminal sexual abuse. Thus, relying on the principles of statutory construction, this court held that, pursuant to section 5 — 8—7(c) of the Unified Code (730 ILCS 5/5 — 8—7(c) (West 2006)), the defendant was entitled to two days of credit for the time he had spent in custody on the aggravated-criminal-sexual-abuse charge because he (1) had been arrested in one case, (2) had been prosecuted in another case, which involved conduct that occurred prior to his arrest in the first case, and (3) had not received credit for the time he had spent in custody in the first case. Revell, 372 Ill. App. 3d at 993, 868 N.E.2d at 328. This court held that, “[a]lthough the State did not expressly drop the initial charge and recharge defendant with another crime, that was the end result. That is, the predatory-criminal-sexual-assault charge essentially replaced the aggravated-criminal-sexual-abuse charge.” Revell, 372 Ill. App. 3d at 993, 868 N.E.2d at 328.
Likewise, in the case subjudice, defendant (1) was arrested for aggravated criminal sexual abuse (case No. 08 — CF—120), (2) was prosecuted for theft over $300 (case No. 07 — CF—1997), which involved conduct that occurred prior to his arrest in case No. 08— CF — 120, and (3) did not receive credit for the time spent in custody in case No. 08 — CF—120 against another sentence. Therefore, pursuant to section 5 — 8—7(c), defendant is entitled to an additional 26 days’ credit. As in Revell, the State did not drop one charge in exchange for the other, but “that was the end result.” See Revell, 372 Ill. App. 3d at 983, 868 N.E.2d at 328. Here, the State agreed to dismiss case No. 08 — CF—120 in exchange for defendant’s guilty pleas in case Nos. 07 — CF—1997 and 07 — CF—2145. Defendant is entitled to receive credit for the time he spent in custody for case No. 08 — CF— 120 against his sentence in case No. 07 — CF—1997 or No. 07 — CF— 2145, for a total of 59 days. We note defendant is also entitled to receive credit at the rate of $5 per day for each day spent in pretrial custody toward the fines imposed at sentencing pursuant to section 110 — 14 of the Code of Criminal Procedure of 1963 (725 ILCS 5/110 — 14 (West 2006)).
III. CONCLUSION
For the foregoing reasons, we modify defendant’s sentence to reflect an additional 26 days of sentence credit and remand for issuance of an amended sentencing judgment.
Affirmed as modified; cause remanded with directions.
McCullough, P.J., concurs.