
683 S.E.2d 544 (2009)
Jerome K. RAWLS
v.
COMMONWEALTH of Virginia.
Record Nos. 081672, 082369.
Supreme Court of Virginia.
September 18, 2009.
*545 Frank K. Friedman (Woods Rogers, on briefs), Roanoke, for appellant.
Susan M. Harris, Assistant Attorney General (William C. Mims, Attorney General, on brief), for appellee.
Present: All the Justices.
OPINION BY Chief Justice LEROY R. HASSELL, SR.

I.
In this appeal, we consider whether a criminal defendant who was convicted of a felony and sentenced to a punishment in excess of a statutorily prescribed maximum range of punishment is entitled to a new sentencing hearing for that conviction.


*546 II.
In 1996, a jury in the Circuit Court of Caroline County convicted Jerome K. Rawls of the following crimes that he committed in April 1992: second degree murder, use of a firearm in the commission of murder, conspiracy to commit armed robbery, and attempted armed robbery.
At the time Rawls committed his criminal offenses, Code § 18.2-32 prescribed that "[a]ll murder other than capital murder and murder in the first degree is murder of the second degree and is punishable as a Class 3 felony." This felony classification permitted a jury to fix a term of imprisonment of not less than five years imprisonment nor more than 20 years imprisonment and a fine of not more than $100,000. Effective July 1, 1993, the General Assembly amended Code § 18.2-32 and increased the range of punishment for second degree murder to not less than five years imprisonment nor more than 40 years imprisonment in a state correctional facility. During Rawls' criminal trial, the Commonwealth and Rawls were under the mistaken impression that the amendments to Code § 18.2-32 were applicable and consequently the jury was incorrectly instructed that it could impose a specific term of imprisonment of not more than 40 years for the murder conviction.
The jury fixed Rawls' punishment as follows: 25 years imprisonment for the second degree murder conviction, two years imprisonment for use of a firearm in the commission of murder, five years imprisonment and a fine of $20,000 for attempted armed robbery, and five years imprisonment for conspiracy to commit armed robbery. The circuit court entered a judgment that confirmed the jury's verdict.
Rawls appealed the judgment of the circuit court to the Court of Appeals, which refused his appeal. Rawls v. Commonwealth, Record No. 1804-96-2 (Mar. 21, 1997). This Court denied Rawls' appeal from the Court of Appeals. Rawls v. Commonwealth, Record No. 970775 (Aug. 4, 1997). Rawls did not challenge the length of his sentence in the Court of Appeals or this Court.
In May 2008, Rawls filed a pro se motion to vacate his conviction for murder because his 25 year sentence exceeded the statutorily prescribed maximum range of punishment set forth in Code § 18.2-32 as the statute existed in 1992, when Rawls committed his crimes. The Commonwealth did not respond to Rawls' motion. The circuit court entered a judgment denying Rawls' motion to vacate. Rawls appealed the circuit court's judgment to this Court, and we appointed counsel for Rawls and granted his appeal.
After Rawls had filed a petition for appeal in this Court, the Commonwealth filed its own motion to vacate in the circuit court styled, Commonwealth v. Rawls. The Commonwealth conceded in its motion that the jury had been improperly instructed regarding the range of punishment for second degree murder. The Commonwealth also acknowledged that at the time that Rawls committed the murder, the crime was punishable for a term of imprisonment not less than five years nor more than 20 years. The Commonwealth requested that the circuit court "vacate its Sentencing Order of July 10, 1996, and enter a new Order sentencing the defendant to a term of imprisonment of twenty years on his conviction of second degree murder."
The circuit court entered an order that stated in part:
"This Court finds that the defendant was sentenced to serve 25 years in prison for second-degree murder on July 10, 1996, and that the sentence exceeded the range of punishment prescribed by statute by five years. The Court hereby vacates its Sentencing Order of July 10, 1996, in this case and enters a new Order sentencing the defendant to a term of imprisonment of twenty years on his conviction of second-degree murder."
Rawls objected to this order and asserted, among other things, that he was entitled to a new sentencing hearing for the murder conviction. We granted Rawls an appeal from this judgment and we consolidated both appeals.

III.
Rawls contends that the portion of his sentence that exceeds the statutorily prescribed *547 maximum punishment is invalid and void. Continuing, Rawls argues that at a minimum he is entitled to a new sentencing hearing on the second degree murder conviction because the circuit court's judgment that merely deleted the excess punishment resulted in the imposition of a sentence that contained "a speculative element."
Responding, the Commonwealth claims that Rawls has procedurally defaulted his claims. The Commonwealth also asserts that Rawls is not entitled to a new sentencing hearing and that the circuit court's order that reduced the excessive portion of Rawls' sentence is appropriate and consistent with this Court's jurisprudence. Additionally, the Commonwealth argues that the circuit court's decision to reduce the excessive portion of Rawls' sentence and enter a judgment for the maximum sentence permitted when Rawls committed the murder did not involve speculation. We disagree with the Commonwealth's contentions.
We reject the Commonwealth's argument that Rawls has defaulted his claims procedurally. Rawls filed a motion to vacate his sentence on the basis that the sentence for the murder conviction was void because it exceeded the statutory range provided by law. This Court has recognized that a motion to vacate is an appropriate procedural device to challenge a void conviction. See Williams v. Commonwealth, 263 Va. 189, 189, 557 S.E.2d 233, 233 (2002); Commonwealth v. Southerly, 262 Va. 294, 299, 551 S.E.2d 650, 653 (2001). Additionally, we stated in Virginia Dept. Corr. v. Crowley, 227 Va. 254, 261, 316 S.E.2d 439, 443 (1984) that "[w]ant of subject-matter jurisdiction may be raised by motion." Accord Nolde Bros. v. Chalkley, 184 Va. 553, 561, 35 S.E.2d 827, 830 (1945), aff'd on other grounds sub nom. Feitig v. Chalkley, 185 Va. 96, 107, 38 S.E.2d 73, 78 (1946); Thacker v. Hubard, 122 Va. 379, 386, 94 S.E. 929, 930 (1918). A circuit court may correct a void or unlawful sentence at any time. Powell v. Commonwealth, 182 Va. 327, 340, 28 S.E.2d 687, 692 (1944).
We note that the Commonwealth's remaining procedural arguments are without merit. Thus, we will consider the litigants' substantive arguments.
As Rawls and the Commonwealth recognize, this Court has held that "[a] sentence in excess of that prescribed by law is not void ab initio because of the excess, but is good in so far as the power of the court extends, and is invalid only as to the excess." Royster v. Smith, 195 Va. 228, 236, 77 S.E.2d 855, 859 (1953); accord Charles v. Commonwealth, 270 Va. 14, 20, 613 S.E.2d 432, 435 (2005); Crutchfield v. Commonwealth, 187 Va. 291, 297-98, 46 S.E.2d 340, 343 (1948). Additionally, we stated in Powell, 182 Va. at 340, 28 S.E.2d at 692: "The authorities are unanimous in the view that a court may impose a valid sentence in substitution for one that is void, even though the execution of the void sentence has commenced.... The invalidity of the judgment does not affect the validity of the verdict."
Our determinations, whether a defendant who has been sentenced in excess of the statutorily prescribed range of punishment is entitled to a new sentencing hearing, have not been uniform. In many instances, our jurisprudence requires a court to speculate regarding how a jury would have fixed a defendant's punishment had the jury been properly instructed or had the jury properly applied a correct instruction.
In Hodges v. Commonwealth, 213 Va. 316, 191 S.E.2d 794 (1972), we considered the appropriate punishment to be imposed upon a defendant who had been sentenced to death but the judgment of death was invalidated by the Supreme Court's decision in Furman v. Georgia, 408 U.S. 238, 92 S.Ct. 2726, 33 L.Ed.2d 346 (1972). The Supreme Court held in Furman that state statutes which authorized discretionary imposition of the death penalty offend the Eighth and Fourteenth Amendments to the Federal Constitution. Rejecting the Commonwealth's suggestion in Hodges that this Court fix the defendant's punishment, we stated:
"Under the Constitution of Virginia the right to trial by jury in criminal cases is guaranteed. Va. Const. Art. I, § 8. Moreover, [when] a criminal case is tried by a jury the punishment shall be ascertained by it. Code § 19.1-291, -292. Here the *548 jury fixed [the defendant's] punishment for the ... murder at the maximum permitted at the time of trial. Nevertheless, it would be sheer speculation for us to conclude that, if death had not then been a permissible punishment, the jury would have fixed the punishment at life imprisonment. The jury might well have agreed upon 99 years, as it did for [another] murder [that the defendant had committed]."
Hodges, 213 Va. at 320-21, 191 S.E.2d at 797. This Court remanded the case to the circuit court for a new trial on the issue of punishment only for the capital murder conviction. Id. at 321, 191 S.E.2d at 798.
In Huggins v. Commonwealth, 213 Va. 327, 191 S.E.2d 734 (1972), this Court again considered the appropriate punishment for a defendant whose punishment had been fixed at death by a jury and the punishment was invalidated by Furman v. Georgia, supra. This Court remanded the case to the circuit court for a new trial on the issue of punishment. We stated that in Virginia, a defendant's right of trial by jury includes a jury's determination of guilt and the corresponding penalty.
In Deagle v. Commonwealth, 214 Va. 304, 199 S.E.2d 509 (1973), we considered whether a defendant who had been sentenced in excess of the statutorily prescribed range of punishment was entitled to a new sentencing hearing. In Deagle, a jury had four statutorily prescribed sentencing alternatives available to it when the jury considered a defendant's punishment and the jury fixed two punishments that were incompatible. The jury imposed a punishment of ten years in the penitentiary and a fine of $1,000. Under the relevant statutes, however, the jury could have imposed a ten year penitentiary sentence upon the defendant, or the jury could have fixed the punishment at a fine of $1,000, but the jury could not impose both punishments. When the circuit court realized that the jury had improperly fixed the defendant's punishment beyond the statutory range of punishment, the circuit court deleted the fine, thereby rendering the sentence consistent with the prescribed range of punishment.
This Court rejected the defendant's request for a new sentencing hearing, stating:
"From the verdicts we know that the jury intended that [the defendant] be sentenced to serve ten years in the penitentiary on each indictment. We also know that the jury wanted [the defendant] to pay a fine of $1,000 on each indictment.
"Common sense and reason dictate that the jury, if it had been required to choose between the two punishments it fixed, would have imposed the greater, the penitentiary sentence, and not the lesser, the fine.
"For this reason we find no error by the trial court in deleting the fines and imposing the penitentiary sentences for we perceive no possible prejudice to the defendant from this action."
Deagle, 214 Va. at 306, 199 S.E.2d at 511.
In Waller v. Commonwealth, 192 Va. 83, 89, 63 S.E.2d 713, 717 (1951), we considered an appeal filed by a defendant who had been convicted and subsequently sentenced by a jury in excess of the statutory range of punishment. In contrast to Deagle, in Waller we granted the defendant a new trial. Additionally, in Jones v. Commonwealth, 61 Va. (20 Gratt.) 848, 858-59 (1871), we awarded a defendant a new trial when the jury fixed the defendant's punishment below the statutorily prescribed mandatory minimum punishment.
As our jurisprudence demonstrates, we have not acted uniformly when determining whether a defendant, who received an improper sentence, was entitled to a new sentencing hearing. For example, if as in Huggins and Hodges, this Court believed that upon retrial a jury may impose a punishment less than the maximum allowable, this Court concluded that a circuit court could only speculate regarding the punishment that a jury might fix and thus the defendants received a new sentencing hearing. However, if as in Deagle, a jury imposed two punishments that are not both statutorily authorized, one punishment which is a fine and the other punishment a lengthy penitentiary term, this Court concluded that the jury intended to impose the harsher punishment and the elimination by a circuit court of the excess punishment did not involve speculation. *549 We also observe that the Court of Appeals has held that if a jury imposes a punishment that it thinks is the maximum allowable by statute but the actual statutorily prescribed maximum punishment is less, the elimination of the excess punishment and the imposition of the legally permissible lesser maximum punishment would not involve speculation because presumably the jury intended to fix the greater punishment. Dargan v. Commonwealth, 27 Va.App. 495, 497-99, 500 S.E.2d 228, 229-30 (1998).
Thus, our jurisprudence permits a court to improperly instruct a jury regarding the statutorily permissible range of punishment and subsequently correct a defendant's sentence, thereby depriving that defendant of his right to be sentenced by a jury. This practice diminishes a criminal defendant's right to a jury trial.
As illustrated by the facts in Rawls' case, even though the jury was improperly instructed that it could fix Rawls' punishment at a maximum of 40 years imprisonment, the jury fixed his punishment at 25 years imprisonment which is five-eighths of what the jury thought was the maximum punishment. Can we infer with any confidence that had the jury been properly instructed that the maximum punishment it could impose upon Rawls for the second degree murder conviction was 20 years imprisonment the jury would have fixed his punishment at 13 years imprisonment, which is approximately five-eighths of 20 years? Absolutely not. Such inference would require that this Court engage in sheer speculation.
Today we adopt the following rule that is designed to ensure that all criminal defendants whose punishments have been fixed in violation of the statutorily prescribed ranges are treated uniformly without any speculation. We hold that a sentence imposed in violation of a prescribed statutory range of punishment is void ab initio because "the character of the judgment was not such as the [C]ourt had the power to render." Anthony v. Kasey, 83 Va. 338, 340, 5 S.E. 176, 177 (1887); accord Evans v. Smyth-Wythe Airport Commission, 255 Va. 69, 73, 495 S.E.2d 825, 828 (1998). Thus, a criminal defendant in that situation is entitled to a new sentencing hearing. This common law rule of jurisprudence will eliminate the need for courts to resort to speculation when determining how a jury would have sentenced a criminal defendant had the jury been properly instructed or had the jury properly followed correct instructions. Applying this rule to Rawls, we hold that he is entitled to a new sentencing hearing on his second degree murder conviction and that the circuit court erred by reducing his second degree murder conviction to a sentence of 20 years imprisonment.
We will decline Rawls' request for a new sentencing hearing on his remaining convictions. Rawls did not raise this issue in the circuit court and we decline to invoke the ends of justice exception contained in Rule 5:25. The jury was properly instructed on Rawls' other convictions and the jury sentenced him within the statutorily prescribed ranges of punishment for those convictions.
Accordingly, we will deny Rawls' request to vacate his convictions with the exception of his second degree murder conviction. Rawls' second degree murder conviction will remain intact; we will vacate the sentence of 20 years imprisonment; and we will remand this conviction to the circuit court for a new sentencing hearing.
Affirmed in part, reversed in part, and remanded.
