fl — The State appeals Adam Chief Lewis’ sentence on two separate cases, arguing that the trial court improperly calculated the amount of credit for time served. The trial court gave Lewis (1) credit for time served that he had previously received credit for in an unrelated resolved case and (2) credit for time served on an unrelated judgment and sentence. Because Lewis received credit for time served more than once, we reverse and remand to the trial court to recalculate the amount of credit for time served.
Lee, J.FACTS
¶2 On May 13,2011, Lewis was arrested in Clark County for numerous crimes. On May 26, 2011, Lewis was charged with first degree burglary and first degree robbery under *341cause number 11-1-00815-1 (burglary charges) and first degree burglary, two counts of first degree assault, two counts of first degree kidnapping, and two counts of unlawful possession of a firearm under cause number 11-1--00816-9 (assault charges). Lewis remained incarcerated in the Clark County Jail.
¶3 On August 10, 2011, while in pretrial incarceration for the burglary charges and assault charges, Lewis was charged with failure to register as a sex offender (cause number 11-1-01336-7). Lewis pleaded guilty to the failure to register as a sex offender charge on August 31, 2012, and was sentenced to 50 months’ confinement. The trial court calculated his credit for time served on the failure to register conviction starting on August 10, 2011 (387 days). Lewis began serving his sentence for the failure to register conviction on August 31, 2012.
¶4 Lewis pleaded guilty to the burglary charges on October 26, 2012, and pleaded guilty to the assault charges on November 5, 2012.1 Lewis was sentenced on both the burglary charges and the assault charges on December 14, 2012. At sentencing for the burglary charges and assault charges, Lewis requested that his credit for time served be calculated based on the entire time he had been incarcerated since his original arrest on May 13, 2011 (581 days). The trial court agreed with Lewis and calculated his credit for time served at 581 days. The State filed a motion for reconsideration, which the trial court denied.
¶5 The State appeals the calculation of Lewis’ credit for time served. The State argues that Lewis should have received credit for only the period of time from his arrest until he was charged with failure to register.
*342ANALYSIS
¶6 The State argues that the trial court erred because the unambiguous language of the statute governing calculation of time served, RCW 9.94A.505(6), limits credit for time served to time served on the charge for which the defendant is being sentenced. Lewis argues that the trial court properly calculated his credit for time served based on the constitutional principles of equal protection underlying the statute codifying the right to credit for time served. Based on both RCW 9.94A.505(6) and the constitutional principles underlying credit for time served, the trial court miscalculated Lewis’ credit for time served; at the time of sentencing, Lewis was not entitled to credit for any time served after August 10, 2011.
¶7 Here, we are required to address a question of statutory interpretation and application of a constitutional principle. We review questions of statutory interpretation de novo. State v. Gonzalez, 168 Wn.2d 256, 263, 226 P.3d 131, cert. denied, 562 U.S. 928 (2010). Similarly, we review constitutional issues de novo. State v. Vance, 168 Wn.2d 754, 759, 230 P.3d 1055 (2010).
¶8 A defendant is entitled to credit for time served based on constitutional principles of due process and equal protection. Reanier v. Smith, 83 Wn.2d 342, 346, 517 P.2d 949 (1974). And RCW 9.94A.505(6) “ ‘simply represents the codification of the constitutional requirement that an offender is entitled to credit for time served prior to sentencing.’ ” In re Pers. Restraint of Costello, 131 Wn. App. 828, 833, 129 P.3d 827 (2006) (quoting State v. Williams, 59 Wn. App. 379, 382, 796 P.2d 1301 (1990)). Our Supreme Court recently explained the constitutional principles underlying credit for time served:
In Reanier [, 83 Wn.2d at 346], this court held that “an accused person, unable to or precluded from posting bail or otherwise procuring his release from confinement prior to *343trial” was entitled to credit for time served upon sentencing. The court based its decision on “principles of due process and equal protection” and on “potential implications of double jeopardy.” [Reanier, 83 Wn.2d] at 347. It reasoned that a contrary decision would result in two separate sets of sentencing ranges — one for “those unable to procure pretrial release from confinement and another for those fortunate enough to obtain such release” — and concluded that such a sentencing regime would not survive rational basis review. [Reanier, 83 Wn.2d] at 346-47. . . .
The Reanier decision absolutely bars the legislature from distinguishing between rich defendants and poor defendants for the purpose of credit for time served, but the legislature remains free to draw many other distinctions.
State v. Medina, 180 Wn.2d 282, 292-93, 324 P.3d 682 (2014).
¶9 The legislature has codified the procedure for calculation of credit for time served in RCW 9.94A.505(6). RCW 9.94A.505(6) states:
The sentencing court shall give the offender credit for all confinement time served before the sentencing if that confinement was solely in regard to the offense for which the offender is being sentenced.
Our objective in interpreting a statute is to ascertain and carry out the legislature’s intent. State v. Evans, 177 Wn.2d 186, 192, 298 P.3d 724 (2013). We begin with the plain language of the statute. Evans, 177 Wn.2d at 192. If the plain language of the statute is unambiguous, our inquiry ends. State v. Armendariz, 160 Wn.2d 106, 110, 156 P.3d 201 (2007).
¶10 The Sentencing Reform Act of 1981, ch. 9.94A RCW, does not generally authorize giving credit for time served on other sentences. State v. Watson, 63 Wn. App. 854, 859, 822 P.2d 327 (1992). Under the plain language of the statute, credit for time served refers solely to the offense for which the offender received a sentence. Watson, 63 Wn. App. at 860. Our courts have been clear that the statute govern*344ing credit for time served entitles a defendant to “nothing more than the constitution require[s].” Williams, 59 Wn. App. at 382. Neither RCW 9.94A.505(6) nor the constitution allows a defendant to receive “twice the amount of credit for the time he or she actually served in jail while awaiting trial and sentencing.” Williams, 59 Wn. App. at 381.
¶11 In Williams, the defendant was charged with second degree robbery, and while awaiting trial he was detained pursuant to suspension of his parole on a previous charge. 59 Wn. App. at 380. At sentencing on the robbery, the defendant requested credit for the 70 days of presentence confinement. Williams, 59 Wn. App. at 381. The trial court denied the request because the 70 days of confinement would be credited toward the sentence he had received on the prior charge. Williams, 59 Wn. App. at 382. On appeal the defendant argued that he was entitled to credit for time served under former RCW 9.94A.120(12) (1998)2 because “but for” the robbery charge he would not have been incarcerated. Williams, 59 Wn. App. at 381. The court noted that such an interpretation would lead to defendants being entitled to “twice the amount of credit for the time he or she actually served in jail while awaiting trial and sentencing,” a result the court labeled absurd. Williams, 59 Wn. App. at 381.
¶12 With the foregoing principles in mind, we turn to the trial court’s calculation of Lewis’ credit for time served. As an initial matter, there are three distinct time periods that factor into the calculation of Lewis’ credit for time served. The first period is from May 13, 2011 (the date Lewis was originally arrested and started serving time in pretrial confinement for the burglary charges and assault charges) until August 9, 2011. The second period is from August 10, 2011 (the date Lewis was charged with failure to register as a sex offender and began serving time in pretrial confine*345ment for the burglary charges, assault charges, and failure to register charges) until August 31, 2012 (the date Lewis was sentenced on the failure to register charge). The third period is from September 1, 2012 (the date Lewis began serving time for the failure to register conviction) until December 14, 2012 (the date Lewis was sentenced on the burglary charges and assault charges).
¶13 Under the plain language of the statute, Lewis would not be entitled to credit for any of the time he served prior to his sentencing on December 14. RCW 9.94A.505(6) requires calculation of time served to be limited to confinement solely in regard to the offense for which the offender is being sentenced. Here, for example, the sentencing court would start with determining the sentence for a single offense such as the burglary charge. Then, the statute requires the sentencing court to determine how much time the offender spent incarcerated solely on that offense. In this case, Lewis did not spend any time incarcerated solely on any offense for which he was sentenced. Therefore, if this court were to strictly apply the statute, the sentencing court erred by giving Lewis credit for any time served.
¶14 However, applying the statute in such a manner simply does not comport with the principles of due process and equal protection that entitle an offender to credit for time served. Regardless of how many offenses an offender has been charged with, an offender serving pretrial confinement would be disadvantaged because he is serving pretrial confinement while a more affluent defendant facing the same charges may not.
¶15 This is the exact distinction the constitution prohibits the legislature from making. Medina, 180 Wn.2d at 292-93. Therefore, an offender is entitled to receive credit for any pretrial confinement he serves, provided he does not receive double credit by applying the same credit for time served on multiple sentences. Williams, 59 Wn. App. at 381.
¶16 For the reasons explained below, application of these principles results in Lewis receiving credit for time served *346for the first period of time between his arrest on May 13, 2011 and August 9, 2011. But, he does not receive credit for time served after the State charged him with the failure to register on August 10, 2011.
A. May 13, 2011 — August 9, 2011
¶17 As of his sentencing on the burglary and assault charges, Lewis had not received any credit for the time he spent in pretrial confinement prior to being charged with failure to register. Although he did not serve any of this time incarcerated solely on a particular offense for which he was sentenced, it would violate due process and equal protection to completely deny him any credit for this time. And, because Lewis was sentenced for all burglary and assault charges on the same date, he would not be receiving double credit for this time. Accordingly, the trial court properly gave Lewis credit for the time served between May 13, 2011 and August 9, 2011.
B. August 10, 2011 — August 31, 2012
f 18 The trial court also gave Lewis credit for time served between August 10, 2011, when he was charged with the failure to register, and August 31, 2012, when he was sentenced on the failure to register. This was improper because it resulted in Lewis receiving double credit for this period of time.
¶[19 When Lewis was sentenced on the failure to register charge, the trial court gave him credit for time served from the date he was charged with the failure to register (August 10, 2011) to the date of sentencing (August 31, 2012). When the trial court gave Lewis credit for the same period of time toward his sentence on the burglary and assault charges, Lewis received credit for this time served twice, which is improper. Williams, 59 Wn. App. at 381. Accordingly, the trial court erred by giving Lewis credit for time served between August 10, 2011 and August 31, 2012 toward his sentence on the burglary and assault charges.
*347C. September 1, 2012 — December 14, 2012
¶20 Lewis also is not entitled to credit for time served for any of the time he was incarcerated following imposition of his sentence for his failure to register as a sex offender conviction. After he was sentenced for failing to register as a sex offender, Lewis clearly was not serving time solely on the burglary and assault charges. In re Pers. Restraint of Schillereff, 159 Wn.2d 649, 651-52, 152 P.3d 345, cert. denied, 551 U.S. 1135 (2007); Watson, 63 Wn. App. at 859-60. Therefore, he was not entitled to credit for time served between September 1, 2012 to December 14, 2012 under the plain language of RCW 9.94A.505(6).
¶21 Furthermore, Lewis is not entitled to credit for time served under the principles of equal protection. Once Lewis was sentenced for failing to register as a sex offender, he was no longer able to be released from confinement. Therefore, the distinction here is between a person being confined as the result of a sentence and a person being confined as the result of the inability to secure bail. This distinction is unrelated to the prohibited distinction between rich and poor that would violate the constitutional principles underlying credit for time served. Medina, 180 Wn.2d at 292-93. The distinction between a person being confined as a result of a sentence and a person being confined pretrial as a result of an inability to secure bail is a distinction well within the legislature’s authority to make. As a result, principles of equal protection do not entitle Lewis to credit for time served after he was sentenced for failing to register as a sex offender. Therefore, the trial court erred by giving him credit for time served for the period between September 1, 2012 and December 14, 2012.
¶22 Here, the trial court incorrectly calculated the amount of credit for time served that Lewis is entitled to receive. Accordingly, we reverse and remand to the trial *348court for a hearing, with Lewis present, to calculate Lewis’ credit for time served consistent with this opinion.
Worswick and Maxa, JJ., concur.
Review granted at 183 Wn.2d 1007 (2015).
Lewis pleaded guilty to one count of first degree assault and one count unlawful possession of a firearm. It appears that the other counts with which he was charged under cause number 11-1-00816-9 were dismissed.
The legislature recodified former RCW 9.94A.120 as RCW 9.94A.505 in Laws of 2001, ch. 10, § 6. The language of the statute remained the same.