An Easy Way to Reverse Code Scale items

Before you run a Cronbach’s alpha or factor analysis on scale items, it’s generally a good idea to reverse code items that are negatively worded so that a high value indicates the same type of response on every item.

So for example let’s say you have 20 items each on a 1 to 7 scale. For most items, a 7 may indicate a positive attitude toward some issue, but for a few items, a 1 indicates a positive attitude.

I want to show you a very quick and easy way to reverse code them using a single command line. This works in any software.

Rather than specifying each individual recoded value–a 1 to 7, 2 to 6, and so on, just subtract the values from a constant one value higher than the highest value on the scale.

For example if OldVariable is reverse coded and on a 1 to 7 scale, in SPSS, do this:

COMPUTE NewVariable = 8 – OldVariable.  (You can also do it in the menus in Transform–>Compute).

In SAS, do this within a data step.

Data scale;
Set scale;
NewVariable = 8 – OldVariable;

The value from which you subtract your old variable will always be one value higher than the highest value you have. So I subtracted my old variable from 8 because I have a 1 to 7 scale. If I had a 1 to 5 scale, I would subtract my old variable from 6.

You can see how it works:


If you only have to reverse code one item, this isn’t a big deal.  But I have found that data cleaning and creating new variables often is the step in data analysis that takes the longest. I use whatever shortcuts I can.


Principal Component Analysis
Summarize common variation in many variables... into just a few. Learn the 5 steps to conduct a Principal Component Analysis and the ways it differs from Factor Analysis.

Reader Interactions


  1. Lawrence Awua says

    Thanks a lot Karen, for your generosity. The lesson and the answers to the various questions are so enriching. Keep doing the nice job. May God bless you.

  2. Chris says

    2 silly but very urgent questions about reverse scoring…

    1) Where do i put my data (answers of the questionnaire) in the data view? under the original variables or the reversed ones?

    For example, suppose we have a likert scale questionnaire from 1 to 5..we reverse score for certain questions (eg. I don’t have a lot of friends=reversed question for the “Extraversion” factor of personality). Let’s say that the participant answers 4 (if we reverse it, the new value is 2)..where do i post the value in the data and which value? a) under the original question (value 4) or under the reversed one? (value 2)…

    2) Do i have to put values in the reversed questions as well as new variables? (given that they’ve already been valued prior reversing).

    Thank you in advance!!
    Best regards, Chris

    • Karen Grace-Martin says

      Hi Chris,

      As a general rule, I always create new variables. Never overwrite your original data just in case you make a mistake in recoding. You need to be able to start over.

      So based on your example, say the original variable is called LotFriends. I would call the new reversed one something like LotFriends.R. Yes, create variable and value labels. And then always use LotFriends.R instead of LotFriends in whatever analysis you’re using. You’ll never use LotFriends again. If you find you have a lot of old variables cluttering up your data set, create a new, smaller data set with only the usable variables to work with, and save the original somewhere safe.

  3. Sam says


    The data that i’m dealing with is measured on a scale of 0 to 4. For some variables, 0 means bad and 4 means good, and for others, 4 means bad and 0 means good. Can I still use the same subtraction method that you’re describing if my measure includes 0? Maybe I should first 1 add everything so it’s a 1 to 5 scale, and then follow your steps?

    Also, even though the methodology describes the data only being collected from 0 to 4, the max observation is 4.013. So if I do the subtraction, should it be from 5 or from 5.013?

    Just for total clarity, the scale the data set uses is 0, 1, 2, 3, 4

    Thank you for this super helpful blog post!

  4. Olagunju Nasiru says

    Very useful, I needed to do this to some NDVI values but I neither knew how to do nor even know the name it’s called. Some random google search landed me here and it’s a solution to my quest.

    Thanks so much.

  5. Farazneh says

    hi I have a question
    do we do the reverse coding after pilot testing or before? and do we have to pilot test again after reverse coding?

  6. cmg says

    Just a quick thanks from a survey researcher who was given a hard copy table set and that’s all. I was not a part of the design, and they had a ranked mean reversed. When will people learn that it takes a professional to design a survey!?!

  7. Dan Kuchinka says

    Duh….lol…I was subtracting from 7. Thank you Dr. Karen. Once I got help from you I realized who you were by seeing the book add under “Read Our Book”…I have it right next to me as I am writing this.

    Great book when I was a student.

  8. Masoud Khamallag says

    Alpha still negative !!!!/ even after reversing the negative wording, the sample is 900, the question is multiple responses (includes 5 sub-questions) wither it is selected or not. what to do? please ?

  9. SAGAR says

    My questions in negative form like how often you faced problem from dampness? Scale i used 1 never and 6 very often.. So most of answer came near 2 or 3… Then can i use reverse coding?

  10. Anna says

    If appears a negative factor loading in second order exploratory factor analysis, what I do? Can I reverse de coding of that first order factor? If yes, how I do that?

    My main goal is to calculate the internal consistency of a second order factor, but on of the loadings gave a negative value…

  11. thush says

    how I categorical in 5 likert scale in this frequencies. 1 strongly agree
    2 Agree 3 Neither agree or disagree 4 Disagree 5 Strongly disagree

    Valid 2.00
    Total 120

  12. MAL says

    I’m doing a pre-post test for students in a class using different methods for half the class sessions – same students. I want to compare which collection methods are received or appreciated the most. How can I use a paired t-test for this comparison?


  13. Tan says

    Hello.. can you teach me how to compute data which got question in Likert scale? how to compute the score to the answer as 1 = "Strongly disagree" , 2 = "Disagree", 3 = "Agree", 4 = "Strongly Agree"Thank You.

  14. ftreu says

    The way you propose is the quickest ro reverse the direction of an item. I use it often.

    If you have missing values you have to complete the action with a new assignment for missing values.

  15. Cynthia says


    Agreed data cleaning is very challenging. So my colleague and I have followed the steps to reverse code into a different and new variable, then when we computed the recoded variables and other unchanged variables our output seemed wrong. Are there any additional steps we may have missed, I have made efforts to do research, but I am wondering if I am not using the correct language when research. Any guidance would help tremendously.

    Thank you,

  16. Ruth says

    Hello –
    How do I label items on a sub-scale that were first (1) reversed scored by recoding into a different variable, (2) then were averaged (Transform > Compute, etc)? Do I use the label from the reversed scored items, or the labels from the not-reversed scored items? For example, of my 10 items on the IPIP 50-item scale, for “Extroversion” 5 items were reversed scored. When I get the MEAN of those items, in the Variable view, under “Label”, how do I label that new scale on a scale of 1 – 5? Thanks so much for your help!

  17. student says

    this might work, if your intention is: high number on a scale is a good thing. but if your scale is supposed to measure sexist attitudes, you better inverse the positive worded items.

    this equals a low mean value on the whole scale, indicating that those low on the scale are not sexist, those high are!

  18. Lise says

    What if my categories have names like “agree” “somewhat agree” “somewhat disagree” and “disagree”? How do I keep the names without transforming the categories into number?

  19. Jake says

    The method you have presented works well when the lowest possible scale value is 1. The more general method for reverse scoring would be:
    reversed score = (minimum score) + (maximum score) – actual score

Leave a Reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.