
119 Wis.2d 612 (1984)
350 N.W.2d 633
STATE of Wisconsin, Plaintiff-Respondent,
v.
Denia HARRIS, Defendant-Appellant-Petitioner.
No. 82-1889-CR.
Supreme Court of Wisconsin.
Argued May 30, 1984.
Decided June 28, 1984.
*613 For the defendant-appellant-petitioner there were briefs and oral argument by Jack E. Schairer, assistant state public defender.
For the plaintiff-respondent the cause was argued by Jerome S. Schmidt, assistant attorney general, with whom on the brief was Bronson C. La Follette, attorney general.
HEFFERNAN, C.J.
This is a review of a decision of the court of appeals, dated August 23, 1983,[1] which affirmed the judgment and order of the circuit court for Kenosha county, Robert Baker, Judge, convicting the defendant of aiding and abetting attempted robbery and as a repeater in violation of secs. 939.05, 939.32, 943.32 (1) (a), and 939.62(1) (b), Stats. The court of appeals held that, because the trial court did not impose a sentence for greater than the maximum allowed by law for a first offender attempted robbery, sec. 939.62[2] could *614 not have been applied and, therefore, it need not decide whether Harris was a repeater. We affirm the decision of the court of appeals as modified, because we conclude that the six month enhancement of the sentence imposed by the trial court in consideration of the repeater status was an abuse of discretion, because sec. 939.62, as a matter of law, was not applicable to a less than maximum sentence and, hence, could not be used to enhance the thirty month sentence imposed for the substantive offense of attempted robbery.
The following facts of record are pertinent to this review. On October 27, 1981, the defendant was charged with the crime of attempted robbery. An information was subsequently filed, which, in addition to the substantive *615 charge of attempted robbery, alleged Harris was a repeater as defined in sec. 939.62(2), because she had been convicted of misdemeanors in the past. After a trial to a jury, on March 16, 1982, Harris was found guilty of attempted robbery, file number 81 CF 455.
At the hearing in the Kenosha circuit court on April 16, 1982, the defendant pleaded no contest to a charge of injury by negligent use of a weapon which occurred on January 25, 1982, file number 82 CF 31. On the same date Harris was sentenced on the charge of injury by negligent use of a weapon and the charge of attempted robbery repeater. The trial judge stated:
"State of Wisconsin, Plaintiff -vs- Denia Harris, defendant. Upon all the files, records and proceedings, it is adjudged that the defendant has been convicted upon her plea of not guilty and verdict of guilty on File No. 81 CF 455, and has been convicted upon her plea of no contest regarding File No. 82 CF 31. The 455 file was, the verdict came in on the 16th day of March, 1982, and of course 82 CF 31 was today. The crime was attempted robbery on the 455 file. There is a repeater. There is a party to a crime, and it was committed on October 27, 1981, in violation of 939.05, 939.42, 943.32(1) (a) and 939.62(1) (b). It is adjudged that the defendant is guilty as convicted on both files. It is adjudged that the defendant is hereby committed to the Wisconsin State Prison for an indeterminate term of not more than three years. The Correctional Institution at Taycheedah is designated as the reception center to which said defendant shall be delivered by the Sheriff.
"With regard to File 31, she is sentenced to one year, on 82 CF 31, and that is concurrent with File 455. The repeater has been taken into consideration, and there would be six months on the File 81 CF 455 which would amount to the three years. That is, 30 months and 6 months...."
Subsequently the defendant filed a postconviction motion which challenged the repeater aspect of her imposed *616 sentence on the ground that she had not been convicted of misdemeanors on "3 separate occasions," as contemplated by sec. 939.62(2), Stats., and thus was not a "repeater" as defined by that statute. In an oral decision from the bench, the trial court denied Harris' postconviction motion, which was entered by order dated October 8, 1982. The defendant appealed the judgment of conviction and the order denying postconviction motion to the court of appeals.
The court of appeals held that sec. 939.62, Stats., did not apply to the defendant because the trial court did not impose a sentence greater than the maximum allowed for a first offender attempted robberyfive years. Secs. 943.32(1) (a), 939.32, 939.50(3) (c). The court of appeals stated that, to construe the section "as applying before the maximum term is imposed deprives its language of meaning." 114 Wis. 2d at 572. It was the conclusion of the court of appeals that the six months of the sentence apportioned as an enhancement for being a repeater was not an abuse of discretion. It concluded that the sentence need not be modified, because the imposed sentence of three years was within the limits set by statute. The court of appeals recognized, however, that it might be irregular to attribute a specific portion of a sentence to a particular sentencing criterion.
The defendant petitioned this court for review, contending that she was not a repeater within the meaning of sec. 939.62(2) and, even if she were, sec. 939.62(1) prohibited a less than maximum sentence from being enhanced. We accepted the petition for review on October 11, 1983.
The issue we address is when is sec. 939.62, Stats., the general repeater statute, applicable to authorize a trial court to increase the maximum term of incarceration prescribed by law for the crime of which the defendant is convicted. We conclude that sec. 939.62 is not applicable *617 to a defendant's sentence unless the maximum sentence is imposed for the crime for which the defendant is convicted.
The general repeater statute, sec. 939.62(1), Stats., provides in relevant part as follows:
"If the actor is a repeater ... and the present conviction is for any crime for which imprisonment may be imposed ... the maximum term of imprisonment prescribed by law for that crime may be increased ...." (Emphasis supplied.)
Both parties agree that the repeater statute is not applicable to the case at bar but assert different reasons for that position. The defendant argues that she is not a repeater as defined in sec. 939.62(2), Stats., because she had not been convicted of a misdemeanor on three separate occasions. The state, on the other hand, contends that the repeater statute is not applicable because it may be applied only to enhance the maximum term of imprisonment prescribed by law. Because the defendant was sentenced to a term of incarceration for less than the maximum prescribed by statute, the state contends sec. 939.62 is not applicable.
Section 939.62(1), Stats., is unambiguous in that reasonable, well informed persons could not disagree as to its meaning or become confused. Kollasch v. Adamany, 104 Wis. 2d 552, 561, 313 N.W.2d 47 (1981); Aero Auto Parts, Inc. v. Dept. of Transportation, 78 Wis. 2d 235, 238, 253 N.W.2d 896 (1977). Section 939.62(1) authorizes a trial court, in its discretion, to increase the "maximum term of imprisonment prescribed by law" for the crime for which the defendant is convicted. This means that, in addition to the maximum sentence allowed by statute for the substantive offense for which the defendant is convicted, the trial court may impose an enhanced penalty. Sentencing by using the process of the *618 repeater statute is completely discretionary on the part of the trial court after the defendant is convicted of an offense and found to be a repeater.
This court has previously stated that being a repeater is not a crimeit is a status; but such status may enhance the punishment for the crime of which the person is convictedthe substantive offense. Block v. State, 41 Wis. 2d 205, 212, 163 N.W.2d 196 (1968); State v. Watkins, 40 Wis. 2d 398, 162 N.W.2d 48 (1968); Hanson v. State, 48 Wis. 2d 203, 208, 179 N.W.2d 909 (1970). A charge of repeater, if proved, "only renders the defendant eligible for an increase in penalty for the crime of which he is convicted." Block, 41 Wis. 2d at 212; State v. McAllister, 107 Wis. 2d 532, 536-37, 319 N.W.2d 865 (1982); State v. Miller, 239 Wis. 334, 1 N.W.2d 178 (1941); Watson v. State, 190 Wis. 245, 208 N.W. 897 (1926). Thus, we have previously recognized, although only by implication, that sec. 939.62 is applicable to a sentence if an increase in the penalty prescribed by law for the crime of which the defendant is convicted is determined to be warranted by the trial court.[3]
*619 The purpose of the general repeater statute "is to increase the punishment of persons who fail to learn to respect the law after suffering the initial penalties and embarrassment of conviction." State v. Banks, 105 Wis. 2d 32, 49, 313 N.W.2d 67 (1981). It is to serve as a warning to first offenders. State v. Midell, 40 Wis. 2d 516, 162 N.W.2d 54 (1968). There can be no increase in punishment prescribed by law if the sentence imposed by the court does not exceed that authorized by statute; and, of course, there is no reason for an enhancement of the penalty when the sentencing judge decides to impose less than the statutory maximum for the substantive crime. A sentence imposed which is within the term authorized by law for the prescribed crime does not invoke the repeater statute. Sec. 939.62(1), Stats., is invoked when the maximum term of imprisonment prescribed by law, in the trial court's discretion, is not sufficient and needs be enhanced.
We make explicit what has previously been implicit. The repeater statute, sec. 939.62, Stats., is not applicable to the sentence of a defendant unless the trial court seeks to impose a sentence in excess of that prescribed by law for the crime for which the defendant is convicted.
If the trial court in its discretion determines that incarceration is warranted for the defendant which is greater than that prescribed by law for the substantive offense, it is incumbent, prior to an imposition of a *620 sentence in excess of the maximum, that the court make a finding that the defendant is a repeater, which authorizes it to increase the sentence pursuant to sec. 939.62(1), Stats. Only when greater than the maximum sentence prescribed by law is imposed upon the defendant can the repeater statute be applicable, and only then is the issue of whether the defendant is a "repeater," as defined by sec. 939.62(2), relevant.
In this case the trial court imposed a sentence of an indeterminate term of not more than three years. The term was less than the maximum imprisonment of five years authorized by statute. As such, the repeater allegation set forth in the information was never made applicable to Denia Harris, because the maximum term of imprisonment was not imposed. We affirm the conclusion of the court of appeals "that since the trial court did not impose a sentence greater than the maximum allowed by law for a first offender, sec. 939.62 was not applied and we need not decide whether Harris was a repeater." 114 Wis. 2d 572. For the reasons stated by the court of appeals, we do not reach the issue raised by the defendant of whether she had been "convicted of a misdemeanor on 3 separate occasions," as required by sec. 939.62(2).
This, however, does not end our inquiry. The defendant asserts that the court of appeals erred when it affirmed the circuit court and held the circuit court did not abuse its discretion by imposing a three year sentence and apportioning six months of the total as an enhancement of the underlying substantive penalty. It is the position of the defendant that, if the repeater statute was not applicable because less than the maximum sentence prescribed by law for attempted robbery was imposed, then the six month sentence the trial court imposed in consideration of the repeater status should be vacated.
*621 The state asserts that the six month allocation of part of the sentence due to the repeater status makes no difference, because the trial court was authorized to impose the sentence it did even in the absence of the defendant's alleged repeater status. The three years imposed is well within the maximum sentence of five years for attempted robbery. The allocation of six months, according to the state, occurred after the imposition of the three year sentence. Consequently, the six month apportionment was merely surplus language, which should be ignored. Finally the state contends that, if it was error for the trial court to apportion the imposed sentence, then sec. 973.12(2), Stats.,[4] entitled "Sentence of a repeater," cures the infirmity.
The court of appeals affirmed the sentence imposed by the trial court, holding that there was no abuse of discretion because there was no indication that the apportionment of six months in consideration of the repeater status was in addition to a prison term already enhanced by Harris' criminal record. It did, however, recognize the irregularity of attributing a specific portion of a sentence to a particular sentencing criterion.
A review of the sentencing hearing of April 16, 1982, reveals that the trial judge considered the defendant's age, educational background, employment, personality, social traits, past record of criminal offenses including juvenile and adult contacts with the criminal justice system, need for rehabilitation, and the nature of the crimes for which she was being sentenced before imposing a *622 sentence. Subsequently, the judge stated that the defendant was being sentenced on the charges of injury by negligent use of a weapon, attempted robbery, and as a repeater. The trial judge stated as follows:
"There is a repeater.... It is adjudged that the defendant is guilty as convicted on both files. It is adjudged that the defendant is hereby committed to the Wisconsin State Prison for an indeterminate term of not more than three years....
"With regard to File 31, she is sentenced to one year, on 82 CF 31, and that is concurrent with File 455. The repeater has been taken into consideration, and there would be six months on the File 81 CF 455 which would amount to the three years. That is, 30 months and 6 months ...."
The issue we address is whether the trial court abused its sentencing discretion when it sentenced the defendant to an indeterminate term of three yearssix months in consideration of the repeater status and thirty months on the substantive offense of attempted robbery. The sentence imposed for the conviction of injury by negligent use of a weapon has not been challenged and is not relevant to our review.
Sentencing is left to the discretion of the trial court, and appellate review is limited to determining whether there was an abuse of discretion. Elias v. State, 93 Wis. 2d 278, 286 N.W.2d 559 (1980); State v. Bernal, 111 Wis. 2d 280, 286-87, 330 N.W.2d 219 (Ct. App. 1983). Questions will be treated in light of strong public policy against interference with the sentencing discretion of the trial court and sentences are afforded the presumption that the trial court acted reasonably. Id. We have acknowledged our reluctance to interfere with a trial court's sentence, because it has a great advantage in considering the relevant factors and the demeanor of the defendant. The complainant, the defendant, must show *623 some unreasonable or unjustified basis in the record for the sentence complained of. State v. Johnson, 74 Wis. 2d 26, 44, 245 N.W.2d 687 (1976).
A trial judge must articulate the basis for the sentence imposed on the facts of record. McCleary v. State, 49 Wis. 2d 263, 182 N.W.2d 512 (1971). The holding of McCleary is summarized as follows:
"[T]here must be evidence that discretion was in fact exercised. Discretion is not synonymous with decision-making. Rather, the term contemplates a process of reasoning. This process must depend on facts that are of record or that are reasonably derived by inference from the record and a conclusion based on a logical rationale founded upon proper legal standards. As we pointed out in State v. Hutnik (1968), 39 Wis. 2d 754, 764, 159 N.W.2d 733, `... there should be evidence in the record that discretion was in fact exercised and the basis of that exercise of discretion should be set forth.'" 49 Wis. 2d at 277.
We have in prior cases set forth factors which the trial court could consider when sentencing a defendant. The primary factors noted in the McCleary decision are the gravity of the offense, the character of the offender, and the need for protection of the public. 49 Wis. 2d at 274-76; Rosado v. State, 70 Wis. 2d 280, 291, 234 N.W.2d 69 (1975); Harris v. State, 75 Wis. 2d 513, 519, 250 N.W.2d 7 (1977); Elias v. State, 93 Wis. 2d at 284. In State v. Harris, 75 Wis. 2d at 519-20, we delineated additional and related factors courts could consider in sentencing, which are as follows:
"(1) Past record of criminal offenses; (2) history of undesirable behavior pattern; (3) the defendant's personality, character and social traits; (4) result of presentence investigation; (5) vicious or aggravated nature of the crime; (6) degree of the defendant's culpability; (7) defendant's demeanor at trial; (8) defendant's age, *624 educational background and employment record; (9) defendant's remorse, repentance and cooperativeness; (10) defendant's need for close rehabilitative control; (11) the rights of the public; and (12) the length of pretrial detention."
The factors considered by the trial court prior to the imposition of sentence were proper. It is well within the trial court's authority to note the defendant's prior convictions when determining the appropriate term of incarceration. Subsequent to reviewing the defendant's background, the judge, however, noted the defendant's alleged status of "repeater" and imposed an indeterminate term of not more than three years, with the repeater having been taken into consideration for six months, and, in the words of the judge, "That is, 30 months and 6 months."
When the legislature granted courts the authority to impose sentences within a certain range, it gave the courts discretion to determine where in that range a sentence should fall. McCleary, 49 Wis. 2d at 275. The legislature also empowered the court to increase the maximum term of incarceration prescribed by law should the defendant be a "repeater" as defined in sec. 939.62 (2). It is apparent, then, that the legislature concluded not all persons who might be found to be repeaters were required to be treated as such or necessarily should be sentenced to a term in excess of the maximum. Rather, the maximum sentence could be imposed and enhanced by the trial court in the exercise of its discretion. As discussed above, a court which imposes a sentence within that range authorized by statute for the substantive offense has no power to enhance that sentence in reliance on the repeater statute, sec. 939.62.
Reliance upon the alleged repeater status of the defendant was irrelevant to the sentence imposed for the attempted robbery conviction, and improper because the *625 repeater statute was not triggered by the imposition of a maximum sentence. By its statement that, "The repeater has been taken into consideration, and there would be six months [added] on," the attempted robbery penalty, the trial judge enhanced the imposed sentence. This view is bolstered by the judge's subsequent statement in which he apparently clarified his intention by saying, "That is, 30 months and 6 months."
The thirty months imposed for the substantive offense of attempted robbery is affirmed. The six months imposed in consideration of the "repeater" status of the defendant is vacated, because the maximum for the substantive offense had not been imposed, and the sentence imposed, based on an error of law, constituted an abuse of discretion. State v. Hutnik, 39 Wis. 2d 754, 763, 159 N.W.2d 733 (1968). Having determined not to impose a maximum underlying sentence, the court, by relying on an erroneous view of the law, nevertheless attempted to use the repeater statute to enhance the sentence. This constituted an abuse of the sentencing discretion.
The state asserts that sec. 973.12(2), Stats., cures the trial court's error. The position is incorrect. Sec. 973.12 (2), by its express language, is relevant only in "case of sentence under s. 939.62." As the court of appeals decision held, and whose view we affirm, sec. 939.62 was not made applicable to Harris, because the trial court did not impose a sentence greater than the maximum allowed by law for a first offender. We have previously interpreted sec. 973.12(2):
"[to allow] the trial judge to mete out one sentence and when `passing sentence' if the court states that some portion of that sentence is due to the criminal's status as a repeat offender, then such a remark shall not constitute reversible error." (Emphasis in original.) State v. Upchurch, 101 Wis. 2d 329, 335, 305 N.W.2d 57 (1981).
*626 The defendant in the instant case, because of the less than maximum sentence, did not acquire a repeater status.
Thus, sec. 973.12(2), Stats., is not applicable and does not cure the trial court's abuse of sentencing discretion based on an error of law.
In summary, we affirm the court of appeals because we conclude that the repeater statute, sec. 939.62, Stats., is not applicable unless the trial court seeks to impose a sentence greater than that prescribed by law for a first offender. We, however, modify the sentence affirmed by the court of appeals, because we conclude that it is clear from the record that the apportioned sentence of six months was intended by the circuit court as an enhancement for a repeater status. That six month sentence is vacated as having been imposed as the result of an abuse of sentencing discretion, the circuit court's error of law in assuming that a repeater enhancement could be invoked without the imposition of a maximum sentence for the substantive crime.
By the Court.Decision of the court of appeals modified and, as modified, affirmed.
NOTES
[1]  114 Wis. 2d 570, 339 N.W.2d 140 (Ct. App. 1983).
[2]  "939.62 Increased penalty for habitual criminality. (1) If the actor is a repeater, as that term is defined in sub. (2), and the present conviction is for any crime for which imprisonment may be imposed (except for an escape under s. 946.42) the maximum term of imprisonment prescribed by law for that crime may be increased as follows:

"(a) A maximum term of one year or less may be increased to not more than 3 years.
"(b) A maximum term of more than one year but not more than 10 years may be increased by not more than 2 years if the prior convictions were for misdemeanors and by not more than 6 years if the prior conviction was for a felony.
"(c) A maximum term of more than 10 years may be increased by not more than 2 years if the prior convictions were for misdemeanors and by not more than 10 years if the prior conviction was for a felony.
"(2) The actor is a repeater if he was convicted of a felony during the 5-year period immediately preceding the commission of the crime for which he presently is being sentenced, or if he was convicted of a misdemeanor on 3 separate occasions during that same period, which convictions remain of record and unreversed. It is immaterial that sentence was stayed, withheld or suspended, or that he was pardoned, unless such pardon was granted on the ground of innocence. In computing the preceding 5-year period, time which the actor spent in actual confinement serving a criminal sentence shall be excluded."
[3]  The defendant cites two Wisconsin cases which she asserts applied sec. 939.62, Stats., to sentences of less than the maximum for the substantive offense. Olson v. State, 69 Wis. 2d 605, 230 N.W.2d 634 (1975), overruled on other grounds; and State v. Upchurch, 101 Wis. 2d 329, 305 N.W.2d 57 (1981). In Olson, as we noted in Upchurch, 101 Wis. 2d at 335 n. 4, secs. 939.62, the section with which we are concerned in the instant case, and 973.12(2) did not apply to the sentence imposed, because the defendant was convicted of delivery of a controlled substance, heroin, in violation of secs. 161.41(1) (a) and 161.14(3) (k) and sentenced under sec. 161.48, entitled, "Second or subsequent offenses," which doubles the potential penalty faced by a repeat drug offender. The issue before the court in Upchurch was whether the defendant's constitutional right to be free from being placed twice in jeopardy of punishment for the same offense was violated when the trial court sentenced him to one year for the offense of possession with intent to deliver marijuana and one year consecutive to the other term for being an habitual criminal. Neither in Olson nor Upchurch was the issue raised or considered of whether the repeater statute could be applied to a sentence when less than the maximum prescribed by law was imposed. The defendant's contention that there are Wisconsin cases which apply sec. 939.62 to sentences within the maximum term prescribed for a first offense is not supported by the decisions of this court.
[4]  "793.12 Sentence of a repeater.

"(2) In every case of sentence under s. 939.62, the sentence shall be imposed for the present conviction, but if the court indicates in passing sentence how much thereof is imposed because the defendant is a repeater, it shall not constitute reversible error, but the combined terms shall be construed as a single sentence for the present conviction."
