Roy Williams filed a petition pursuant to G. L. c. 211, § 3, in the county court, seeking reversal of an order of a judge in the Superior Court denying Williams’s motion to correct his jail time credit to include fourteen days spent in custody awaiting trial on charges pertaining to various property crimes. See G. L. c. 279, § 33A.2 The motion was filed in 2011, nearly *628five years after Williams had completed his sentence on an unrelated rape conviction, and sought to apply the fourteen days of credit to that sentence. The receipt of such credit would have had the effect of granting Williams an earlier release date on the rape conviction. As a consequence, he no longer would have been a lawful “prisoner” at the time the Commonwealth filed a petition for his civil commitment as a sexually dangerous person (SDP) under G. L. c. 123A and, therefore, would not have been subject to such a commitment. The Superior Court judge concluded that Williams’s motion was untimely and moot. A single justice denied his petition for extraordinary relief, and Williams appealed. We affirm.
1. Background. On June 9, 1987, Williams was arraigned in the Brockton Division of the District Court Department on charges of burglary, wanton destruction of property, disorderly conduct, and breaking and entering in the nighttime. He was held in lieu of bail at the Plymouth County jail. On June 23, 1987, after a bench trial, Williams was convicted of wanton destruction of property and of breaking and entering in the nighttime, and he was found not guilty of the remaining charges. He was sentenced to one year in a house of correction, with sixty days to be served and the balance suspended, and probation until June 2, 1989. Williams appealed, claiming a trial in the regular jury session of the District Court. On March 14, 1988, the day when his trial was to commence, the charges against Williams were dismissed with prejudice.
Meanwhile, on June 23, 1987, Williams had been arraigned in the District Court on charges of aggravated rape and indecent assault and battery. Those charges subsequently were dismissed, and Williams was indicted on July 21, 1987, in the Superior Court on a charge of forcible rape of a child under sixteen. On October 17, 1988, a jury found Williams guilty of the lesser included offense of rape of a child. He was sentenced to ten to twenty years in State prison and received 482 days of jail time credit. This credit was for the time that Williams was held in custody on the rape and indecent assault and battery charges from June 23, 1987, until October 17, 1988; it did not include the fourteen days that he was held in lieu of bail from June 9, 1987, until June 23, 1987, for the various property crimes. After *629completing his sentence on the rape conviction, Williams was discharged on August 23, 2006. One day earlier, on August 22, 2006, the Commonwealth had filed a petition for Williams’s civil commitment as an SDP pursuant to G. L. c. 123A.
On June 20, 2011, Williams filed a motion in the Superior Court to correct his jail time credit by increasing it to 496 days, reflecting the addition of the fourteen days from June 9, 1987, until June 23, 1987, that had not been counted.3 A judge denied the motion, concluding that it was untimely and moot because Williams had been discharged from his sentence on the rape conviction prior to the filing of his motion. Williams’s subsequent motion for reconsideration also was denied. The same judge stated that Williams “sat on his legal claims for over two decades” and only raised the matter after his release “for the obvious purpose of defeating [the SDP] petition.” The judge determined that, by his actions, Williams had waived the right to challenge his underlying sentence.
On August 25, 2011, Williams filed his petition for relief pursuant to G. L. c. 211, § 3, in the county court.4 In denying the petition, the single justice stated that, even assuming that Williams was entitled to an additional fourteen days of credit, he waived his right to credit for those days by requesting it more than two decades after the imposition of his sentence on the 1988 rape conviction and nearly five years after the expiration of that sentence. Such delay severely prejudiced the Commonwealth because it could have filed an SDP petition before the expiration of an amended sentence had Williams moved to recalculate his credit while he still was in jail. The single justice determined that because Williams sought recalculation only *630after he was released from custody, he remained a “prisoner” for purposes of G. L. c. 123A until August 23, 2006, the date of his actual release.5 The present appeal ensued.
2. Discussion. Williams contends that the sentence on his rape conviction was incorrectly calculated because he was entitled to fourteen additional days of jail time credit. He asserts that because the initial charges of which he was found guilty (wanton destruction of property and breaking and entering in the nighttime) ultimately were dismissed, the fourteen days he spent in custody awaiting trial on those charges constituted “dead time” for which he was entitled to credit.6 Had such credit been properly factored into his rape sentence, his release date would have been August 9, 2006. It followed that at the time the Commonwealth filed its SDP petition on August 22, 2006, he would no longer have been a “prisoner” and, therefore, did not fall within the class of persons subject to commitment under G. L. c. 123A, § 12 (b). Accordingly, in Williams’s view, he is entitled to immediate release. We disagree.
This court’s power of general superintendence pursuant to G. L. c. 211, § 3, is a discretionary power exercised only in “the most exceptional circumstances.” Costarelli v. Commonwealth, 374 Mass. 677, 679 (1978). Absent an abuse of that discretion, or other error of law, we will not disturb the decision of a single justice denying relief. See, e.g., Commonwealth v. Cousin, 449 Mass. 809, 815 (2007), cert. denied, 553 U.S. 1007 (2008); Youngworth v. Commonwealth, 436 Mass. 608, 611 (2002); Commonwealth v. Nettis, 418 Mass. 715, 717 (1994). Here, Williams has not demonstrated that the single justice abused his discretion, or otherwise erred, in concluding that Williams had waived his claim to fourteen days of additional jail time credit by not requesting it until nearly five years after the completion of his sentence on the 1988 rape conviction.
Pursuant to G. L. c. 279, § 33A, “[cjriminal defendants have *631a right to have their sentences reduced by the amount of time they spend in custody awaiting trial, unless in imposing the sentence, the judge has already deducted such time or taken it into consideration in determining the sentence.”7 Commonwealth v. Milton, 427 Mass. 18, 23-24 (1998) (Milton). See Commonwealth v. Carter, 10 Mass. App. Ct. 618, 620 (1980) (prisoner is entitled to credit for all jail time served before sentencing that relates to crime for which prisoner is sentenced). “[T]he basic purpose of the statute [is] to provide for relief to those defendants who have served any jail time prior to their sentences.” Commonwealth v. Grant, 366 Mass. 272, 274 (1974). See Commonwealth v. Harvey, 66 Mass. App. Ct. 297, 299-300 (2006). See also Commonwealth v. Morasse, 446 Mass. 113, 117 (2006) (discussing legislative history and purpose of G. L. c. 279, § 33A). Cf. Needel, petitioner, 344 Mass. 260, 262 (1962) (G. L. c. 127, § 129B, designed “to afford relief to those not convicted and not serving any sentence but who because of inability to obtain bail, for example, were held in custody awaiting trial”).
We have said that “time spent in custody awaiting trial for one crime generally may not be credited against a sentence for an unrelated crime.” Milton, supra at 24. See Libby v. Commissioner of Correction, 353 Mass. 472, 475 (1968). See also Commonwealth v. Carter, supra at 620 n.4 (prisoner generally does not receive credit for jail time served for unrelated offense); Kinney, petitioner, 5 Mass. App. Ct. 457, 460 (1977). In other words, a prisoner does not have a statutory right to credit for time spent in confinement on unrelated charges. See Milton, supra. This ensures that criminal defendants are not “banking” time, thereby establishing a line of jail time credit that can be applied to future offenses. See id. at 24-25, and cases cited.
Nonetheless, recognizing that the subject of jail time credit should be viewed “against the backdrop of fair treatment of the *632prisoner,” Commonwealth v. Grant, supra at 275, we have concluded that, “[i]n some circumstances, a defendant may be allowed to credit time in an unrelated case if necessary to prevent a defendant from serving ‘dead time.’ ” Milton, supra at 24. See Chalifoux v. Commissioner of Correction, 375 Mass. 424, 427 (1978) (fairness and justice are appropriate considerations in deciding whether and to what extent credit should be given for time spent in custody); Piggott v. Commissioner of Correction, 40 Mass. App. Ct. 678, 682 (1996) (there is strong policy against defendants serving “dead time”). Where appropriate, the allowance of such credit is designed to remedy the injustice of a defendant serving jail time for which he otherwise would receive no credit. See Manning v. Superintendent, Mass. Correctional Inst., Norfolk, 372 Mass. 387, 395-396 (1977) (Manning) (defendant allowed to credit time served on first sentence, which was vacated on appeal, against second consecutive sentence on unrelated offense where defendant was convicted of second offense before being discharged on first); Commonwealth v. Foley, 17 Mass. App. Ct. 238, 242-244 (1983) (fairness dictated that prisoner receive credit on current sentence for time spent in custody awaiting trial on unrelated charges that resulted in acquittal and nonprosecution). Contrast Milton, supra at 24-25 (defendant not entitled to credit for time served awaiting trial on robbery charge to reduce sentence imposed for unrelated crime committed six months after defendant’s acquittal and discharge on robbery charge); Commonwealth v. Harvey, supra at 302 (credit for “dead time” only applicable to sentence on charge pending at time of pretrial detention).
When faced with a request for jail time credit regarding unrelated offenses, a judge must give due consideration to two guiding principles. First, where possible, in the interest of fairness, a prisoner should not be required to serve “dead time.” See Milton, supra, and cases cited. Second, care should be taken to ensure that a prisoner is not banking time or getting double credit for time. See Manning, supra at 395; Commonwealth v. Maldonado, 64 Mass. App. Ct. 250, 251-252 (2005). “[I]t is not our intention to grant prisoners license to commit future criminal acts with [impunity].” Manning, supra.
Here, there is no question that Williams was held in custody *633from June 9, 1987, until June 23, 1987, pending trial on charges of burglary, wanton destruction of property, disorderly conduct, and breaking and entering in the nighttime. It is similarly without question that the two charges on which he was found guilty subsequently were dismissed. Once those charges were dismissed, it was incumbent on Williams, as the person who was in the best position to know that he could be entitled to jail time credit, to file a motion to have the sentence on his 1988 rape conviction recalculated. A judge then could have determined whether, in the interests of fairness and justice, Williams should have received credit for “dead time.” However, Williams never filed such a motion during the time that he was serving his sentence on the rape conviction. Once he was discharged from that sentence on August 23,2006, it was too late to seek recalculation because the judge plainly could not give credit on a sentence that already had been served in its entirety.8
Williams’s contention that his claim of entitlement to the fourteen days of jail time credit did not become apparent until after the Commonwealth filed its SDP petition on August 22, 2006, is unavailing. A prisoner’s ability, in some circumstances, to obtain jail time credit in order to avoid serving “dead time” is nothing new. See Milton, supra at 24; Manning, supra at 396. Similarly, since 1999, the Commonwealth has had the statutory right to file a petition to have a prisoner civilly committed as an SDP pursuant to G. L. c. 123A, § 12 (b). See St. 1999, c. 74, § 8. Whether, in fact, the Commonwealth filed a petition to have Williams committed as an SDP had no bearing on the issue whether, as a general matter, Williams was entitled to fourteen days of credit for the time that he was held in custody from June 9, 1987, until June 23, 1987. The SDP petition is relevant only because Williams now seeks to avoid its consequences by belatedly claiming that he was not a “prisoner” when the peti*634tion was filed on August 22, 2006, given that, in Williams’s view, he should have been released before that date on the basis of jail time credit. Williams’s claim for jail time credit should have been raised while he still was serving his sentence on the rape conviction when, if appropriate, relief could have been afforded.
3. Conclusion. There is no basis on which to conclude that the single justice abused his discretion or otherwise erred in denying Williams’s petition under G. L. c. 211, § 3.
Judgment affirmed.
General Laws c. 279, § 33A, which is addressed to the sentencing judge, provides: “The court on imposing a sentence of commitment to a correctional institution of the commonwealth, a house of correction, or a jail, shall order that the prisoner be deemed to have served a portion of said sentence, such portion to be the number of days spent by the prisoner in confinement prior to such sentence awaiting and during trial.”
In addition, on November 16, 2010, Williams filed in the Superior Court a motion to dismiss the petition for his civil commitment as a sexually dangerous person (SDP) brought by the Commonwealth, asserting that he improperly was denied jail time credit. Williams argued that, as a consequence, the Commonwealth’s SDP petition was untimely, and he was not subject to civil commitment under G. L. c. 123A. A judge denied the motion. On July 26, 2011, Williams filed a second motion to dismiss, which appears still to be pending, and a trial date was scheduled for January 24, 2012. The present status of these proceedings is not apparent from the record.
On November 18, 2011, Williams also filed an appeal in the Appeals Court, challenging the Superior Court judge’s order denying his request for fourteen additional days of jail time credit. Proceedings in the Appeals Court have been stayed pending our resolution of the present matter.
The single justice also denied Williams’s petition for a writ of habeas corpus and his complaint for declaratory and injunctive relief. Because Williams has not specifically challenged these aspects of the single justice’s order in the present appeal, we need not consider them further.
“The term ‘dead time’ refers to time spent in confinement for which no day-to-day credit is given against any sentence.” Commonwealth v. Milton, 427 Mass. 18, 21 n.4 (1998).
General Laws c. 127, § 129B, which is addressed to the Commissioner of Correction, also provides: “The sentence of any prisoner in any correctional institution of the commonwealth or in any house of correction or jail, who was held in custody awaiting trial shall be reduced by the number of days spent by him in confinement prior to such sentence and while awaiting trial, unless the court in imposing such sentence had already deducted therefrom the time during which such prisoner had been confined while awaiting trial.”
Contrary to his argument, Williams’s claim to fourteen days of jail time credit did not constitute the mere correction of a “clerical error,” given that there was no judicial determination that he was entitled to such credit in the first instance. See Commonwealth v. Barriere, 46 Mass. App. Ct. 286, 290-291 (1999) (determination whether prisoner entitled to credit to reduce time remaining on sentence involves act of adjudication rather than clerical correction). The untimeliness of Williams’s motion deprived him of the opportunity to receive such a judicial determination.