Md. Code, Crim. Proc. § 6-218

Current with changes from the 2024 Legislative Session
Section 6-218 - Credit against sentence for time spent in custody
(a) This section does not apply to a parolee who is returned to the custody of the Division of Correction because of a subsequent crime and is confined before being sentenced for the subsequent crime.
(b)
(1) A defendant who is convicted and sentenced shall receive credit against and a reduction of the term of a definite or life sentence, or the minimum and maximum terms of an indeterminate sentence, for all time spent in the custody of a correctional facility, hospital, facility for persons with mental disorders, or other unit because of:
(i) the charge for which the sentence is imposed; or
(ii) the conduct on which the charge is based.
(2) If a defendant is in custody because of a charge that results in a dismissal or acquittal, the time that would have been credited if a sentence had been imposed shall be credited against any sentence that is based on a charge for which a warrant or commitment was filed during that custody.
(3) In a case other than a case described in paragraph (2) of this subsection, the sentencing court may apply credit against a sentence for time spent in custody for another charge or crime.
(c) A defendant whose sentence is set aside because of a direct or collateral attack and who is reprosecuted or resentenced for the same crime or for another crime based on the same transaction shall receive credit against and a reduction of the term of a definite or life sentence, or the minimum and maximum terms of an indeterminate sentence, for all time spent in custody under the prior sentence, including credit applied against the prior sentence in accordance with subsection (b) of this section.
(d) A defendant who is serving multiple sentences, one of which is set aside as the result of a direct or collateral attack, shall receive credit against and a reduction of the remaining term of a definite or life sentence, or the remaining minimum and maximum terms of an indeterminate sentence, for all time spent in custody under the sentence set aside, including credit applied against the sentence set aside in accordance with subsection (b) of this section.
(e)
(1) The court shall award the credit required by this section at the time of sentencing.
(2) After having communicated with the parties, the court shall tell the defendant and shall state on the record the amount of the credit and the facts on which the credit is based.

Md. Code, CP § 6-218