
25 Cal.App.4th 756 (1994)
31 Cal. Rptr. 653
THE PEOPLE, Plaintiff and Respondent,
v.
JAVIER GUILLEN, Defendant and Appellant.
Docket No. B073647.
Court of Appeals of California, Second District, Division Four.
June 6, 1994.
*758 COUNSEL
Donald M. Re for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Carol Wendelin Pollack, Assistant Attorney General, Sharon Wooden Richard and Lance E. Winters, Deputy Attorneys General, for Plaintiff and Respondent.
*759 OPINION
EPSTEIN, J.
In this case we consider whether double jeopardy and Penal Code section 1157 bar retrial of a large quantity enhancement when a defendant is found guilty of possession for sale but the jury is unable to reach a verdict on the enhancement. We conclude that retrial is proper under these circumstances. We modify the judgment to correct a credit miscalculation, and affirm the judgment as modified.

FACTUAL AND PROCEDURAL SUMMARY
During surveillance of a residence at 750 Broadway in Venice on April 16, 1991, Los Angeles Police Detective Anthony Manente observed appellant Javier Guillen exit the front door carrying a cellular phone and a black leather pouch. Appellant walked out to the sidewalk. After a few minutes, a man walked up to appellant and the two engaged in conversation. The man who had approached appellant reached into his pocket and handed some money to appellant. Appellant reached into the black leather pouch, removed something and handed it to the man. Appellant put the money in his pocket and the man left.
On April 23, 1991, Detective Manente and other officers returned to the address with a search warrant. They watched as appellant walked through a gate between the residence and a detached garage, and then returned to the front door of the residence and entered with a key.
A pager, $991, and a set of keys were found in appellant's possession. The keys opened the front door of the house, appellant's vehicle, and the security door to the garage. In a bedroom, later determined to be used by appellant's brother, officers found $3,700 in a jacket that appeared to fit the brother. In another bedroom, officers found $1,500 and a handgun.
The officers found a cellular phone and charger on a kitchen counter. Behind the phone was the black leather pouch seen on appellant's person seven days before. The pouch contained a clear plastic baggie with 8.63 grams of cocaine inside.
The officers then went to the detached garage. One of the keys taken from appellant opened the dead bolt on the security door, but none of them opened the entry lock. The officers broke the door and entered.
They observed a garage which had been converted into an apartment, although it contained no food, dishes or kitchen appliances. Mail, including *760 bank statements addressed to appellant at that address, and a checkbook in appellant's name, were found on a counter in the kitchen.
In one of the garage bedrooms, the officers discovered two scales, each on top of a nightstand. They found a plastic garbage bag and two boxes of plastic baggies secreted between the nightstands. The plastic garbage bag contained an open box of baking soda, a metal pan, a spatula, several large plastic baggies, a number of rubber gloves, and a plastic baggie containing a white residue.
In a second garage bedroom, the officers retrieved two baggies containing a total of 17.73 grams of cocaine from a sewing cabinet. They found a large cardboard box in a closet which contained 17 kilogram-size packages. The packages held a total of 36.4 pounds of cocaine.
Appellant was charged by information with one count of possession for sale of cocaine (Health & Saf. Code, § 11351; all statutory references are to this code unless noted) with an allegation that the weight of cocaine possessed exceeded 25 pounds, within the meaning of section 11370.4, subdivision (a).
Trial was by jury. Appellant was found guilty of possession of a controlled substance for sale, as charged. The jury was unable to reach a decision on the weight enhancement, and a mistrial was declared as to that allegation. Appellant moved to dismiss the weight enhancement on double jeopardy grounds and on the basis of Penal Code section 1157. His motion was denied. Appellant and all counsel then waived jury trial on the enhancement and submitted the matter to the court on the transcript of the previous trial. Both sides further stipulated that if the court found the enhancement allegation to be true, it would be for the lesser (10-pound) weight enhancement of section 11370.4, subdivision (a)(2). The court stated that appellant was guilty of possession of a controlled substance for sale, and it found the lesser weight allegation of section 11370.4, subdivision (a)(2) to be true. He was sentenced to a term of two years on count 1, and five years on the weight enhancement. This is a timely appeal from the judgment of conviction.

DISCUSSION

I
Appellant claims it was a violation of the double jeopardy clause to subject him to retrial on the weight enhancement to count 1 after the jury had convicted him on that count.
*761 (1) The Fifth Amendment to the United States Constitution provides: "No person shall ... be subject for the same offense to be twice put in jeopardy of life or limb...." This guarantee is applicable to the states by virtue of the Fourteenth Amendment (Benton v. Maryland (1969) 395 U.S. 784, 794 [23 L.Ed.2d 707, 715-716, 89 S.Ct. 2056]), and is afforded as well by the California Constitution, article I, section 15.
The double jeopardy clause includes several protections: "`It protects against a second prosecution for the same offense after acquittal. It protects against a second prosecution for the same offense after conviction. And it protects against multiple punishments for the same offense.' [Citation.]" (Schiro v. Farley (1994) 510 U.S. ___ [127 L.Ed.2d 47, 56, 114 S.Ct. 783, 789].) (2) Double jeopardy also may bar retrial even though no verdict has been rendered. "Once jeopardy has attached, discharge of the jury without a verdict is tantamount to an acquittal and prevents a retrial, unless the defendant consented to the discharge or legal necessity required it. [Citations.] `Such a legal necessity exists if, at the conclusion of such time as the court deems proper, it satisfactorily appears to the court that there is no reasonable probability that the jury can resolve its difference and render a verdict. Under these circumstances the court may properly discharge the jury and reset for trial.' [Citations.]" (Stone v. Superior Court (1982) 31 Cal.3d 503, 516 [183 Cal. Rptr. 647, 646 P.2d 809].)
(3) Double jeopardy principles have been held to bar retrial of a weight enhancement allegation where the true finding was reversed for insufficiency of evidence. (People v. Bonner (1979) 97 Cal. App.3d 573, 575 [158 Cal. Rptr. 821].) "The Double Jeopardy Clause forbids a second trial for the purpose of affording the prosecution another opportunity to supply evidence which it failed to muster in the first proceeding. This is central to the objective of the prohibition against successive trials." (Burks v. United States (1978) 437 U.S. 1, 11 [57 L.Ed.2d 1, 9, 98 S.Ct. 2141]; People v. Bonner, supra, 97 Cal. App.3d at pp. 574-575.)
But where, in bifurcated proceedings, the jury was discharged before the truth of the enhancement allegations had been submitted to the jury, further proceedings on the enhancements are not barred by double jeopardy. (See People v. Saunders (1993) 5 Cal.4th 580, 594-597 [20 Cal. Rptr.2d 638, 853 P.2d 1093].)
In our case, while the truth of the weight enhancement had been submitted to the jury, the jury was unable to decide the question, and a mistrial was declared as to that issue. In effect, trial of the factual issue had been terminated on the basis of legal necessity. (See Stone v. Superior Court, *762 supra, 31 Cal.3d at p. 516.) Where mistrial is properly declared based on legal necessity, double jeopardy principles do not bar subsequent prosecution. (Ibid.)
(4) Appellant does not challenge the declaration of mistrial as to the weight enhancement. He argues instead that the conviction on the substantive offense in count 1 involved the same charge, the same elements, and the same facts as the weight enhancement. Hence, he claims, a second prosecution on that enhancement was barred by double jeopardy.
A similar argument was made and rejected in People v. Schulz (1992) 5 Cal. App.4th 563 [7 Cal. Rptr.2d 269]. In Schulz, a jury convicted defendant of attempted murder, but was unable to reach a verdict on the great bodily injury enhancement. On appeal, defendant argued that the enhancement could not be separately tried after the jury failed to reach a verdict on it because it is not a distinct offense, but only an increased punishment based on the same facts as the substantive charge. His argument was rejected: "Jeopardy does not attach solely from the fact of a mistrial, and a defendant may be retried until complete and final disposition is made of all charges. [Citations.]" (Id. at pp. 568-569, italics added.)
Appellant argues that his conviction on count 1, possession of cocaine for sale, and the jury's inability to reach a decision as to the weight enhancement reflect its factual determination that he possessed only the cocaine found in the black pouch or in the sewing machine, not the 17 kilos found in the garage. Thus, he claims, subsequent trial of the weight enhancement constituted an improper retrial of the issue of whether he possessed the cocaine in the garage. This argument invokes the collateral estoppel aspect of double jeopardy.
In Ashe v. Swenson (1970) 397 U.S. 436 [25 L.Ed.2d 469, 90 S.Ct. 1189], the Supreme Court explained that the double jeopardy clause incorporates the doctrine of collateral estoppel. In this context, as in others, collateral estoppel "means simply that when an issue of ultimate fact has once been determined by a valid and final judgment, that issue cannot again be litigated between the same parties in any future lawsuit." (Id. at p. 443 [25 L.Ed.2d at p. 475].) To evaluate appellant's argument, we must consider whether the jury's verdict on count 1 involved its resolution of his possession of the 17 kilos of cocaine found in the garage.
The jury was instructed in terms of CALJIC No. 17.01, as modified by appellant. This instruction stated, in part: "If you find beyond a reasonable doubt that the defendant possessed the 17 kilos of cocaine in the garage for *763 purpose of sale, you may find him guilty of possession for sale. Further, you may find the allegation of weight in excess of 25 pounds to be true, but only on the basis of a finding of guilt based on the 17 kilos found in the garage. [¶] If you find beyond a reasonable doubt that the defendant possessed the cocaine in the sewing cabinet for purpose of sale, you may find him guilty of possession for sale. [¶] If you find beyond a reasonable doubt that the defendant possessed the cocaine in the black pouch for purpose of sale, you may find him guilty of possession for sale. [¶] If you find beyond a reasonable doubt that the defendant possessed the cocaine in the sewing cabinet and/or in the black pouch but do not conclude beyond a reasonable doubt that he possessed the cocaine for purpose of sale, you may find the defendant guilty of possession of cocaine. [¶] In order to reach a verdict of guilty based on the cocaine found at any particular location, all 12 jurors must unanimously agree on the defendant's guilt based on the cocaine found at the same location. It is not necessary that the location be stated in your verdict."
In accordance with this instruction, appellant's conviction of possession of cocaine for sale could have been based on the jurors' unanimous agreement that he possessed for sale the cocaine found in the black pouch, or in the sewing machine. Either was a sufficient basis for conviction on count 1. The jury's inability to reach a decision as to the weight enhancement reflected its inability to reach a unanimous decision as to whether appellant possessed the 17 kilos of cocaine found in the garage. The jury did not resolve that factual question; hence the collateral estoppel aspect of the double jeopardy clause is not implicated, and litigation of that issue is not barred. (See Schiro v. Farley, supra, 510 U.S. at p. ___ [127 L.Ed.2d at pp. 57-58, 114 S.Ct. at p. 790]; see also People v. Griffin (1994) 22 Cal. App.4th 801, 811-812 [27 Cal. Rptr.2d 721].)
Appellant also contends that retrial of the weight enhancement violated Penal Code section 1157. That section provides: "Whenever a defendant is convicted of a crime ... which is distinguished into degrees, the jury, or the court if a jury trial is waived, must find the degree of the crime ... of which he is guilty. Upon the failure of the jury or the court to so determine, the degree of the crime ... of which the defendant is guilty, shall be deemed to be of the lesser degree."
The substantive crime in this case, possession for sale of a controlled substance (§ 11351) is not divided into degrees. Penal Code section 1157 applies to crimes which are "distinguished into degrees." It is not applicable to this case.


*764 II

Presentence Credits
(5) The Attorney General challenges the calculation of presentence credits in this case. Computational errors of this kind result in an unauthorized sentence, and are subject to correction by the trial court or the appellate court when presented. (See People v. Walkkein (1993) 14 Cal. App.4th 1401, 1411 [18 Cal. Rptr.2d 383].) The correction should be made even if it results in less credit (and hence a longer term in custody) for the defendant. (People v. Serrato, supra, 9 Cal.3d at p. 763.)
We are aware of recent decisions indicating that such correction should be sought from the trial court in the first instance, with resort to the Courts of Appeal only on a showing that relief is not available or is refused at the trial court level. (People v. Fares (1993) 16 Cal. App.4th 954 [20 Cal. Rptr.2d 314]; People v. Little (1993) 19 Cal. App.4th 449, 451 [23 Cal. Rptr.2d 394].) We agree that when the question presented involves a fact determination or an exercise of discretion, the issue should be tendered first to the trial court. Arguably, the same is true when the claim of error in calculation is the only issue in the case. But when the sentence issue presented is essentially arithmetic in nature, involving no factual assessment or exercise of discretion and, in fact, will take no more than a few minutes of appellate time, it is far more economical to resolve it through the appellate process than to require the institution of a trial court proceeding. This is especially true when it is one of a number of issues raised on appeal (as it typically is when it is raised by the Attorney General).
The facts are not in dispute. Appellant had 633 days of presentence custody, not 656 as reflected in the sentencing minute order. He was arrested on April 8, 1991, and was sentenced on January 15, 1993; the custody time was thus 253 days in 1991, 366 in 1992 (it was a leap year), and 15 in 1993. His worktime, good conduct credit is derived by dividing the days of actual custody by four, not by rounding up fractional numbers, and multiplying the result by two. (People v. Smith (1989) 211 Cal. App.3d 523, 527 [259 Cal. Rptr. 515]; People v. King (1992) 3 Cal. App.4th 882, 885 [4 Cal. Rptr.2d 723].) In this case, that exercise yields 316 days. Added to the 633 days of actual custody, the total credit entitlement is 950 days. The abstract of judgment should be corrected to reflect that amount rather than the 984 days now shown.


*765 DISPOSITION
The abstract of judgment is modified to reflect 950 days of presentence credit; as so modified the judgment is affirmed.
Woods (A.M.), P.J., and Klein (Brett), J.,[*] concurred.
NOTES
[*]   Judge of the Municipal Court for the Los Angeles Judicial District sitting under assignment by the Chairperson of the Judicial Council.
