JUSTICE MARSHALL delivered the opinion of the Court.
Florida, like many other States, rewards each convicted prisoner for good conduct and obedience to prison rules by using a statutory formula that reduces the portion of his sentence that he must serve. In this case, we consider whether a Florida statute altering the availability of such "gain time for good conduct"1 is unconstitutional as an ex post facto law when applied to petitioner, whose crime was committed before the statute's enactment.
The relevant facts are undisputed. Petitioner pleaded guilty to second-degree murder. The crime charged occurred on January 31, 1976. On May 13, 1976, petitioner was convicted and sentenced to a prison term of 15 years, less time already served. The state statute in place on both the date of the offense and the date of sentencing provided a formula for deducting gain-time credits from the sentences "of every prisoner who has committed no infraction of the rules or regulations of the division, or of the laws of the state, and who has performed in a faithful, diligent, industrious, orderly and peaceful manner, the work, duties and tasks assigned to him." Fla. Stat. § 944.27 (1) (1975).2 According to the formula, gain-time credits were to be calculated by the month and were to accumulate at an increasing rate the more time the prisoner had already served. Thus, the statute directed that the authorities "shall grant the following deductions" from a prisoner's sentence as gain time for good conduct:
"(a) Five days per month off the first and second years of his sentence;
"(b) Ten days per month off the third and fourth years of his sentence; and
"(c) Fifteen days per month off the fifth and all succeeding years of his sentence." Fla. Stat. § 944.27 (1) (1975).
In 1978, the Florida Legislature repealed § 944.27 (1) and enacted a new formula for monthly gain-time deductions. This new statute provided:
"(a) Three days per month off the first and second years of the sentence;
"(b) Six days per month off the third and fourth years of the sentence; and
"(c) Nine days per month off the fifth and all succeeding years of the sentence." Fla. Stat. § 944.275 (1) (1979).3
The new provision was implemented on January 1, 1979, and since that time the State has applied it not only to prisoners sentenced for crimes committed since its enactment in 1978, but also to all other prisoners, including petitioner, whose offenses took place before that date.4
Petitioner, acting pro se, sought a writ of habeas corpus from the Supreme Court of Florida on the ground that the new statute as applied to him was an ex post facto law prohibited by the United States and the Florida Constitutions.5 He alleged that the reduced accumulation of monthly gain-time credits provided under the new statute would extend his required time in prison by over 2 years, or approximately 14 percent of his original 15-year sentence.6 The State Supreme Court summarily denied the petition. 376 So.2d 855. The court relied on its decision in a companion case raising the same issue where it reasoned that "gain time allowance is an act of grace rather than a vested right and may be withdrawn, modified, or denied." Harris v. Wainwright, 376 So.2d 855, 856 (1979).7 We granted certiorari, 445 U.S. 927, and we now reverse.
The ex post facto prohibition8 forbids the Congress and the States to enact any law "which imposes a punishment for an act which was not punishable at the time it was committed; or imposes additional punishment to that then prescribed." Cummings v. Missouri, 4 Wall. 277, 325-326 (1867). See Lindsey v. Washington, 301 U.S. 397, 401 (1937); Rooney v. North Dakota, 196 U.S. 319, 324-325 (1905); In re Medley, 134 U.S. 160, 171 (1890); Calder v. Bull, 3 Dall. 386, 390 (1798).9 Through this prohibition, the Framers sought to assure that legislative Acts give fair warning of their effect and permit individuals to rely on their meaning until explicitly changed. Dobbert v. Florida, 432 U.S. 282, 298 (1977); Kring v. Missouri, 107 U.S. 221, 229 (1883); Calder v. Bull, supra, at 387. The ban also restricts governmental power by restraining arbitrary and potentially vindictive legislation. Malloy v. South Carolina, 237 U.S. 180, 183 (1915); Kring v. Missouri, supra, at 229; Fletcher v. Peck, 6 Cranch 87, 138 (1810); Calder v. Bull, supra, at 395, 396 (Paterson, J.); the Federalist No. 44 (J. Madison), No. 84 (A. Hamilton).10
In accord with these purposes, our decisions prescribe that two critical elements must be present for a criminal or penal law to be ex post facto: it must be retrospective, that is, it must apply to events occurring before its enactment,11 and it must disadvantage the offender affected by it.12 Lindsey v. Washington, supra, at 401; Calder v. Bull, supra, at 390. Contrary to the reasoning of the Supreme Court of Florida, a law need not impair a "vested right" to violate the ex post facto prohibition.13 Evaluating whether a right has vested is important for claims under the Contracts or Due Process Clauses, which solely protect pre-existing entitlements. See, e. g., Wood v. Lovett, 313 U.S. 362, 371 (1941); Dodge v. Board of Education, 302 U.S. 74, 78-79 (1937). See also United States Railroad Retirement Board v. Fritz, 449 U.S. 166, 174 (1980). The presence or absence of an affirmative, enforceable right is not relevant, however, to the ex post facto prohibition, which forbids the imposition of punishment more severe than the punishment assigned by law when the act to be punished occurred. Critical to relief under the Ex Post Facto Clause is not an individual's right to less punishment, but the lack of fair notice and governmental restraint when the legislature increases punishment beyond what was prescribed when the crime was consummated. Thus, even if a statute merely alters penal provisions accorded by the grace of the legislature, it violates the Clause if it is both retrospective and more onerous than the law in effect on the date of the offense.14 We now consider the Florida statute in light of these two considerations.
The respondent maintains that Florida's 1978 law altering the availability of gain time is not retrospective because, on its face, it applies only after its effective date. Brief for Respondent 12, 15-16. This argument fails to acknowledge that it is the effect, not the form, of the law that determines whether it is ex post facto.15 The critical question is whether the law changes the legal consequences of acts completed before its effective date. In the context of this case, this question can be recast as asking whether Fla. Stat. § 944.275 (1) (1979) applies to prisoners convicted for acts committed before the provision's effective date. Clearly, the answer is in the affirmative. The respondent concedes that the State uses § 944.275 (1), which was implemented on January 1, 1979, to calculate the gain time available to petitioner, who was convicted of a crime occurring on January 31, 1976.16 Thus, the provision attaches legal consequences to a crime committed before the law took effect.
Nonetheless, respondent contends that the State's revised gain-time provision is not retrospective because its predecessor was "no part of the original sentence and thus no part of the punishment annexed to the crime at the time petitioner was sentenced." Brief for Respondent 12. This contention is foreclosed by our precedents. First, we need not determine whether the prospect of the gain time was in some technical sense part of the sentence to conclude that it in fact is one determinant of petitioner's prison term—and that his effective sentence is altered once this determinant is changed. See Lindsey v. Washington, 301 U. S., at 401-402; Greenfield v. Scafati, 277 F.Supp. 644 (Mass. 1967) (three-judge court), summarily aff'd, 390 U.S. 713 (1968). See also Rodriguez v. United States Parole Comm'n, 594 F.2d 170 (CA7 1979) (elimination of parole eligibility held an ex post facto violation). We have previously recognized that a prisoner's eligibility for reduced imprisonment is a significant factor entering into both the defendant's decision to plea bargain and the judge's calculation of the sentence to be imposed. Wolff v. McDonnell, 418 U.S. 539, 557 (1974); Warden v. Marrero, 417 U.S. 653, 658 (1974). See United States v. De Simone, 468 F.2d 1196 (CA2 1972); Durant v. United States, 410 F.2d 689, 692 (CA1 1969). Second, we have held that a statute may be retrospective even if it alters punitive conditions outside the sentence. Thus, we have concluded that a statute requiring solitary confinement prior to execution is ex post facto when applied to someone who committed a capital offense prior to its enactment, but not when applied only prospectively. Compare In re Medley, 134 U.S. 160 (1890), with Holden v. Minnesota, 137 U.S. 483 (1890). See also Cummings v. Missouri, 4 Wall. 277 (1867).17
For prisoners who committed crimes before its enactment, § 944.275 (1) substantially alters the consequences attached to a crime already completed, and therefore changes "the quantum of punishment." See Dobbert v. Florida, 432 U. S., at 293-294. Therefore, it is a retrospective law which can be constitutionally applied to petitioner only if it is not to his detriment. Id., at 294.
Whether a retrospective state criminal statute ameliorates or worsens conditions imposed by its predecessor is a federal question. Lindsey v. Washington, supra, at 400. See Malloy v. South Carolina, 237 U. S., at 184; Rooney v. North Dakota, 196 U. S., at 325. The inquiry looks to the challenged provision, and not to any special circumstances that may mitigate its effect on the particular individual. Dobbert v. Florida, supra, at 300; Lindsey v. Washington, supra, at 401; Rooney v. North Dakota, supra, at 325.
Under this inquiry, we conclude § 944.275 (1) is disadvantageous to petitioner and other similarly situated prisoners. On its face, the statute reduces the number of monthly gain-time credits available to an inmate who abides by prison rules and adequately performs his assigned tasks. By definition, this reduction in gain-time accumulation lengthens the period that someone in petitioner's position must spend in prison. In Lindsey v. Washington, supra, at 401-402, we reasoned that "[i]t is plainly to the substantial disadvantage of petitioners to be deprived of all opportunity to receive a sentence which would give them freedom from custody and control prior to the expiration of the 15-year term." Here, petitioner is similarly disadvantaged by the reduced opportunity to shorten his time in prison simply through good conduct. In Greenfield v. Scafati, supra, we affirmed the judgment of a three-judge District Court which found an ex post facto violation in the application of a statute denying any gain time for the first six months after parole revocation to an inmate whose crime occurred before the statute's enactment. There, as here, the inmate was disadvantaged by new restrictions on eligibility for release. In this vein, the three-judge court in Greenfield found "no distinction between depriving a prisoner of the right to earn good conduct deductions and the right to qualify for, and hence earn, parole. Each . . . materially `alters the situation of the accused to his disadvantage.'" 277 F. Supp., at 646 (quoting In re Medley, supra, at 171). See also Murphy v. Commonwealth, 172 Mass. 264, 52 N. E. 505 (1899).
Respondent argues that our inquiry should not end at this point because Fla. Stat. § 944.275 (1) (1979) must be examined in conjunction with other provisions enacted with it. Brief for Respondent 18-26. Respondent claims that the net effect of all these provisions is increased availability of gain-time deductions.18 There can be no doubt that the legislature intended through these provisions to promote rehabilitation and to create incentives for specified productive conduct. See Fla. Stat. § 944.012 (1979). But none of these provisions for extra gain time compensates for the reduction of gain time available solely for good conduct. The fact remains that an inmate who performs satisfactory work and avoids disciplinary violations could obtain more gain time per month under the repealed provision, § 944.27 (1) (1975), than he could for the same conduct under the new provision, § 944.275 (1) (1979). To make up the difference, the inmate has to satisfy the extra conditions specified by the discretionary gain-time provisions.19 Even then, the award of the extra gain time is purely discretionary, contingent on both the wishes of the correctional authorities and special behavior by the inmate, such as saving a life or diligent performance in an academic program. Fla. Stat. §§ 944.275 (3) (a), (b) (1979). In contrast, under both the new and old statutes, an inmate is automatically entitled to the monthly gain time simply for avoiding disciplinary infractions and performing his assigned tasks. Compare Fla. Stat. § 944.275 (1) (1979) with § 944.27 (1) (1975).20 Thus, the new provision constricts the inmate's opportunity to earn early release, and thereby makes more onerous the punishment for crimes committed before its enactment. This result runs afoul of the prohibition against ex post facto laws.21
We find Fla. Stat. § 944.275 (1) (1979) void as applied to petitioner, whose crime occurred before its effective date. We therefore reverse the judgment of the Supreme Court of Florida and remand this case for further proceedings not inconsistent with this opinion.22
Reversed and remanded.
JUSTICE BLACKMUN, with whom THE CHIEF JUSTICE joins, concurring in the judgment.
Were the Court writing on a clean slate, I would vote to affirm the judgment of the Supreme Court of Florida. My thesis would be: (a) the 1978 Florida statute operates only prospectively and does not affect petitioner's credits earned and accumulated prior to the effective date of the statute; (b) "good time" or "gain time" is something to be earned and is not part of, or inherent in, the sentence imposed; (c) all the new statute did was to remove some of petitioner's hope and a portion of his opportunity; and (d) his sentence therefore was not enhanced by the statute. In addition, as the Court's 18th footnote reveals, ante, at 34-35, the statutory change by no means was entirely restrictive; in certain respects it was more lenient, as the Court's careful preservation for this prisoner of the new statute's other provisions clearly implies. Ante, at 36 and this page, n. 22.
The Court's precedents, however, particularly Lindsey v. Washington, 301 U.S. 397 (1937), and the summary disposition of Greenfield v. Scafati, 277 F.Supp. 644 (Mass. 1967), aff'd, 390 U.S. 713 (1968), although not warmly persuasive for me, look the other way, and I thus must accede to the judgment of the Court.
JUSTICE REHNQUIST, concurring in the judgment.
I find this case a close one. As the Court recently noted: "It is axiomatic that for a law to be ex post facto it must be more onerous than the prior law." Dobbert v. Florida, 432 U.S. 282, 294 (1977). Petitioner was clearly disadvantaged by the loss of the opportunity to accrue gain time through good conduct pursuant to the 5-10-15 formula when the legislature changed to a 3-6-9 formula. The new statute, however, also afforded petitioner opportunities not available under prior law to earn additional gain time beyond the good-conduct formula.* The case is not resolved simply by comparing the 5-10-15 formula with the 3-6-9 formula. "We must compare the two statutory procedures in toto to determine if the new may be fairly characterized as more onerous." Ibid.
I am persuaded in this case, albeit not without doubt, that the new statute is more onerous than the old, because the amount of gain time which is accrued automatically solely through good conduct is substantially reduced, and this reduction is not offset by the availability of discretionary awards of gain time for activities extending beyond simply "staying out of trouble." This is not to say, however, that no reduction in automatic gain time, however slight, can ever be offset by increases in the availability of discretionary gain time, however great, or that reductions in the amount of credit for good conduct can never be offset by increases in the availability of credit which can be earned by more than merely good conduct.
Since the availability of new opportunities for discretionary gain time and the reduction in the amount of automatic gain time can be viewed as a total package, it must be emphasized that nothing in today's decision compels Florida to provide prisoners in petitioner's position with the benefits of the new provisions when this Court has held that Florida may not require such prisoners to pay the price. It is not at all clear that the Florida Legislature would have intended to make available the new discretionary gain time to prisoners earning automatic gain time under the old 5-10-15 formula, when the legislature in fact reduced the 5-10-15 formula when it enacted the new provisions. The question is, of course, one for Florida to resolve.