
23 So.3d 63 (2008)
STATE of Alabama
v.
Wesley Randall QUICK.
CR-06-2156.
Court of Criminal Appeals of Alabama.
June 27, 2008.
Rehearing Denied August 22, 2008.
*64 Kim T. Thomas, gen. counsel, and Greg Biggs, asst. gen. counsel, Department of Corrections, for appellant.
Wesley Randall Quick, pro se.
SHAW, Judge.
The State of Alabama appeals the circuit court's order granting Wesley Randall Quick's petition for a writ of habeas corpus seeking credit for time he spent incarcerated before he pleaded guilty to three burglary charges.
On July 10, 2006, Quick filed a petition for a writ of habeas corpus, in which he alleged that the Department of Corrections ("DOC") had miscalculated the amount of jail time credited against his sentences for two counts of first-degree burglary and one count of third-degree burglary. After receiving a motion to dismiss from the DOC, the circuit court summarily dismissed Quick's petition for a writ of habeas corpus. Quick appealed that dismissal to this Court, and this Court, finding that Quick's claims were facially meritorious and were not refuted by the DOC's response, remanded the cause for the circuit court to conduct an evidentiary hearing on Quick's petition. Quick v. State, 983 So.2d 414 (Ala.Crim.App.2007). On June 21, 2007, the circuit court conducted an evidentiary hearing on Quick's petition. Following the hearing, the circuit court granted Quick's petition. On October 26, 2007, this Court, on return to remand, issued an unpublished memorandum dismissing the appeal as moot on the ground that Quick had been granted the relief he had requested in his petition. The DOC filed a timely notice of appeal from the circuit court's order granting Quick's petition; this appeal follows.
At the hearing, the parties stipulated that Quick had been continuously confined from the time of his arrest on November 5, 1995, until his sentencing for the burglary convictions on October 24, 2003. The record indicates that on November 5, 1995, Quick was arrested for one count of first-degree burglary (case no. CC-96-1746) *65 and for one count of capital murder, and that on January 11, 1996, Quick was arrested for one count of first-degree burglary (case no. CC-96-3803) and one count of third-degree burglary (case no. CC-96-3804).[1] The parties agreed that Quick never posted bond on the burglary charges, and the circuit court noted that an attempt to post bond would have been futile because Quick would not have been released with the capital charge pending.
The record indicates that Quick's first trial on the capital charge ended in a mistrial because of juror misconduct. Quick was again brought to trial for the capital offense; he was convicted of capital murder on September 30, 1997, and on March 6, 1998, the trial court sentenced Quick to death. On direct appeal from that conviction and sentence, this Court, finding that Quick had shown a particularized need for the transcript of his first trial and the absence of suitable alternatives, held that he was entitled to a free transcript of the prior trial, and we reversed Quick's conviction and death sentence and remanded the cause for a new trial. Quick v. State, 825 So.2d 246 (Ala.Crim.App.2001). Quick was tried a third time on the capital charge, and on April 21, 2003, he was acquitted.
The record further reflects that following his acquittal of the charge of capital murder the trial court set no bond on the three burglary charges. On October 24, 2003, Quick pleaded guilty to the three burglary charges and was sentenced to 33 years' imprisonment for each first-degree-burglary conviction (cases no. CC-96-1746 and CC-96-3803) and to 10 years' imprisonment for the third-degree-burglary conviction (case no. CC-96-3804); the sentences were to run consecutively. The record reflects, and Quick concedes, that he received jail credit for the time he spent incarcerated after he was acquitted of capital murder but before he was sentenced for the burglary charges. Kathy Holt, director of central records division for the DOC, testified at the evidentiary hearing that the calculation of Quick's release date was correct and that she had spoken with the sentencing judge, who had confirmed that the jail credit Quick had received for the burglary charges was accurate.
After the evidentiary hearing in this matter, the circuit court instructed the parties to submit briefs supporting their respective positions. Quick argued in his trial brief, as he did in his petition, and as he argues in his brief on appeal, that because he was eventually acquitted of the capital-murder charge, he should receive additional jail credit against his burglary sentences for the entire time he spent incarcerated from his arrest on November 5, 1995, until his acquittal of capital murder on April 21, 2003. The DOC argued in its trial brief, as it had argued to the trial court at the hearing, and as it argues in its brief on appeal, that Quick is not entitled to any jail credit for the time he spent incarcerated from November 5, 1995, to his acquittal on the capital-murder charge because, it said, the incarceration was due to the capital-murder charge, not the burglary charges, and that the sentencing judge had made the correct determination as to the proper jail credit. After receiving those briefs, the circuit court issued an *66 order granting Quick's petition for a writ of habeas corpus.
A petition for a writ of habeas corpus is the proper method by which to test whether the State has correctly calculated the time an inmate must serve in prison. See, e.g., Breach v. State, 687 So.2d 1257 (Ala.Crim.App.1996); and Swicegood v. State, 646 So.2d 158 (Ala.Crim.App.1993). "It is well established that a petition for writ of habeas corpus is the proper procedure to determine whether the appellant has been credited with the correct amount of actual time spent incarcerated pending trial for the offense for which he was eventually sentenced." Taunton v. State, 562 So.2d 614, 614 (Ala.Crim.App.1989).
Section 15-18-5, Ala.Code 1975, provides:
"Upon conviction and imprisonment for any felony or misdemeanor, the sentencing court shall order that the convicted person be credited with all of his actual time spent incarcerated pending trial for such offense. The actual time spent incarcerated pending trial shall be certified by the circuit clerk or district clerk on forms to be prescribed by the Board of Corrections."
"[Section 15-18-5, Ala.Code 1975] does not suggest that the offender should receive credit for the same jail time more than once." Prichard v. State, 441 So.2d 1052, 1053 (Ala.Crim.App.1983). Further, it is well established that "[a] defendant is not entitled to accumulate credit for time served while he is serving time on another conviction." Youngblood v. State, 437 So.2d 629, 630 (Ala.Crim.App.1983). Rather, the inmate should receive credit only where the conviction resulting in the sentence is the cause of the inmate's pretrial confinement. See id.
Based on the record before this Court, including the stipulated facts and the specific arguments presented below and on appeal, it is apparent that although coinciding with the burglary convictions he now seeks credit against, the cause of Quick's pretrial confinement was the capital-murder charge. At best, Quick's incarceration beginning on November 5, 1995, was based in part on his arrest on that date for the first-degree-burglary charge in case no. CC-96-1746, but he has presented no set of facts indicating that that charge resulted in his remaining in jail. Rather, as the State argues, Quick was held without bond on the capital-murder charge, and he could not have gained his release at anytime before his acquittal on the capital-murder charge. Thus, although the timeline of events in this case differs from that in Youngblood, supra, the underlying principle is the same  the cause of Quick's pretrial confinement was the capital-murder charge, not the burglary charges. In addition, nothing in our research supports Quick's bare assertions that because he was acquitted of the capital-murder charge, that acquittal somehow transformed the cause of his confinement during the period in question from the capital-murder proceedings to the pending burglary proceedings. Therefore, Quick was not entitled to the relief requested in his petition, and the circuit court erred in granting Quick's petition for a writ of habeas corpus and ordering that Quick be credited with the jail time he requested in his petition.
Based on the foregoing, the judgment of the circuit court granting Quick's habeas petition is reversed and this cause is remanded for proceedings consistent with this opinion.
REVERSED AND REMANDED.
BASCHAB, P.J., and McMILLAN, J., concur. WELCH, J., dissents, with opinion.
*67 WELCH, Judge, dissenting.
I believe that the effect of the holding of the majority's opinion in denying Wesley Randall Quick credit for jail time served from the date of his arrest for burglary and attempting to apply that time to a charge for which he was ultimately acquitted is fundamentally unfair.
Quick was arrested on a charge of first-degree burglary on November 5, 1995, the same day he was arrested on a charge of capital murder. Two months after, he was arrested on two additional counts of burglary. There is no dispute that Quick has remained incarcerated from November 5, 1995, forward, and that he remains incarcerated as of this date. Quick did not attempt to post bond on the burglary charges because to do so would have been futile in light of the capital-murder charge pending against him.
The majority determines that the reason Quick was in jail from November 5, 1995, to the date of his acquittal on the capital-murder charge in April 2003, was because he could not have been released from jail while that charge was pending. I agree that a defendant is not entitled to accumulate credit for time served while he is serving time on another conviction, see Youngblood v. State, 437 So.2d 629 (Ala. Crim.App.1983). However, in this case, Quick was serving time pending the trials of both the capital-murder charge and the burglary charges, and when he was ultimately acquitted of the capital-murder charge, the time he spent in jail awaiting trial should have been applied to one of his remaining burglary convictions, regardless of whether he would have been able to make bond on a pending burglary charge.
For the reasons set forth above, I would affirm the judgment of the trial court. Accordingly, I respectfully dissent from the majority opinion.
NOTES
[1]  We note that Quick stated in his petition that he was arrested for capital murder on November 5, 1995, and arrested for all three burglary charges on January 11, 1996. However, the conviction reports in the record indicate that Quick was arrested for first-degree burglary in case no. CC-96-1746 on November 5, 1995. For purposes of this appeal, we will use the November 5, 1995, date, a date more favorable to Quick, despite the assertion in his petition.
