<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.7.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>127</ContextCount>
  <ElementCount>323</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>41</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000 - Disclosure - Document And Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document And Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>001 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ConsolidatedBalanceSheet</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>002 - Statement - CONSOLIDATED BALANCE SHEETS (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parentheticals)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>003 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ConsolidatedIncomeStatement</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>004 - Statement - CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ShareholdersEquityType2or3</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>005 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ConsolidatedCashFlow</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>006 - Disclosure - SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES</Role>
      <ShortName>SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>007 - Disclosure - INVESTMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INVESTMENTS</Role>
      <ShortName>INVESTMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>008 - Disclosure - FAIR VALUE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/FAIRVALUE</Role>
      <ShortName>FAIR VALUE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>009 - Disclosure - OTHER ASSETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/OTHERASSETS</Role>
      <ShortName>OTHER ASSETS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>010 - Disclosure - ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES</Role>
      <ShortName>ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>011 - Disclosure - NET INCOME PER SHARE FROM CONTINUING OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/NETINCOMEPERSHAREFROMCONTINUINGOPERATIONS</Role>
      <ShortName>NET INCOME PER SHARE FROM CONTINUING OPERATIONS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>012 - Disclosure - LEASES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/LEASES</Role>
      <ShortName>LEASES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>013 - Disclosure - COMMON STOCK</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/COMMONSTOCK</Role>
      <ShortName>COMMON STOCK</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>014 - Disclosure - REVOLVING LINES OF CREDIT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/REVOLVINGLINESOFCREDIT</Role>
      <ShortName>REVOLVING LINES OF CREDIT</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>015 - Disclosure - DERIVATIVE FINANCIAL INSTRUMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS</Role>
      <ShortName>DERIVATIVE FINANCIAL INSTRUMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>016 - Disclosure - EMPLOYEE BENEFITS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/EMPLOYEEBENEFITS</Role>
      <ShortName>EMPLOYEE BENEFITS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>017 - Disclosure - COMMITMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/COMMITMENTS</Role>
      <ShortName>COMMITMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>018 - Disclosure - INCOME TAXES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INCOMETAXES</Role>
      <ShortName>INCOME TAXES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>019 - Disclosure - DISCONTINUED OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DISCONTINUEDOPERATIONS</Role>
      <ShortName>DISCONTINUED OPERATIONS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>020 - Disclosure - CONTINGENCIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/CONTINGENCIES</Role>
      <ShortName>CONTINGENCIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>021 - Disclosure - NET SALES AND REVENUE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/NETSALESANDREVENUE</Role>
      <ShortName>NET SALES AND REVENUE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>022 - Disclosure - QUARTERLY UNAUDITED INFORMATION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATION</Role>
      <ShortName>QUARTERLY UNAUDITED INFORMATION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>023 - Disclosure - RELATED PARTIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/RELATEDPARTIES</Role>
      <ShortName>RELATED PARTIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>024 - Disclosure - Schedule II - VALUATION AND QUALIFYING ACCOUNTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS</Role>
      <ShortName>Schedule II - VALUATION AND QUALIFYING ACCOUNTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>025 - Disclosure - Accounting Policies, by Policy (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/AccountingPoliciesByPolicy</Role>
      <ShortName>Accounting Policies, by Policy (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>026 - Disclosure - SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables</Role>
      <ShortName>SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>027 - Disclosure - INVESTMENTS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INVESTMENTSTables</Role>
      <ShortName>INVESTMENTS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INVESTMENTS</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>028 - Disclosure - FAIR VALUE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/FAIRVALUETables</Role>
      <ShortName>FAIR VALUE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/FAIRVALUE</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>029 - Disclosure - OTHER ASSETS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/OTHERASSETSTables</Role>
      <ShortName>OTHER ASSETS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/OTHERASSETS</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>030 - Disclosure - ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables</Role>
      <ShortName>ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>031 - Disclosure - NET INCOME PER SHARE FROM CONTINUING OPERATIONS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/NETINCOMEPERSHAREFROMCONTINUINGOPERATIONSTables</Role>
      <ShortName>NET INCOME PER SHARE FROM CONTINUING OPERATIONS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/NETINCOMEPERSHAREFROMCONTINUINGOPERATIONS</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>032 - Disclosure - LEASES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/LEASESTables</Role>
      <ShortName>LEASES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/LEASES</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>033 - Disclosure - COMMON STOCK (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/COMMONSTOCKTables</Role>
      <ShortName>COMMON STOCK (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/COMMONSTOCK</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>034 - Disclosure - DERIVATIVE FINANCIAL INSTRUMENTS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables</Role>
      <ShortName>DERIVATIVE FINANCIAL INSTRUMENTS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>035 - Disclosure - EMPLOYEE BENEFITS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables</Role>
      <ShortName>EMPLOYEE BENEFITS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/EMPLOYEEBENEFITS</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>036 - Disclosure - INCOME TAXES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INCOMETAXESTables</Role>
      <ShortName>INCOME TAXES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXES</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>037 - Disclosure - DISCONTINUED OPERATIONS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DISCONTINUEDOPERATIONSTables</Role>
      <ShortName>DISCONTINUED OPERATIONS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DISCONTINUEDOPERATIONS</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>038 - Disclosure - NET SALES AND REVENUE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/NETSALESANDREVENUETables</Role>
      <ShortName>NET SALES AND REVENUE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/NETSALESANDREVENUE</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>039 - Disclosure - QUARTERLY UNAUDITED INFORMATION (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATIONTables</Role>
      <ShortName>QUARTERLY UNAUDITED INFORMATION (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATION</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>040 - Disclosure - SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails</Role>
      <ShortName>SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>041 - Disclosure - SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details) - Schedule of components of inventory</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofcomponentsofinventoryTable</Role>
      <ShortName>SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details) - Schedule of components of inventory</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>042 - Disclosure - SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details) - Schedule of Property Plant and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofPropertyPlantandEquipmentTable</Role>
      <ShortName>SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES (Details) - Schedule of Property Plant and Equipment</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>043 - Disclosure - INVESTMENTS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INVESTMENTSDetails</Role>
      <ShortName>INVESTMENTS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INVESTMENTSTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>044 - Disclosure - INVESTMENTS (Details) - Schedule of Equity Method Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable</Role>
      <ShortName>INVESTMENTS (Details) - Schedule of Equity Method Investments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INVESTMENTSTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>045 - Disclosure - INVESTMENTS (Details) - Schedule of Condensed Balance Sheet</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofCondensedBalanceSheetTable</Role>
      <ShortName>INVESTMENTS (Details) - Schedule of Condensed Balance Sheet</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INVESTMENTSTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>046 - Disclosure - INVESTMENTS (Details) - Schedule of Financial information For Equity Method Investment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofFinancialinformationForEquityMethodInvestmentTable</Role>
      <ShortName>INVESTMENTS (Details) - Schedule of Financial information For Equity Method Investment</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INVESTMENTSTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>047 - Disclosure - FAIR VALUE (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/FAIRVALUEDetails</Role>
      <ShortName>FAIR VALUE (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/FAIRVALUETables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>048 - Disclosure - FAIR VALUE (Details) - Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable</Role>
      <ShortName>FAIR VALUE (Details) - Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/FAIRVALUETables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>049 - Disclosure - OTHER ASSETS (Details) - Schedule of Other Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofOtherAssetsTable</Role>
      <ShortName>OTHER ASSETS (Details) - Schedule of Other Assets</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/OTHERASSETSTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>050 - Disclosure - ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES (Details) - Schedule of accrued expenses and other current liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofaccruedexpensesandothercurrentliabilitiesTable</Role>
      <ShortName>ACCRUED EXPENSES AND OTHER CURRENT LIABILITIES (Details) - Schedule of accrued expenses and other current liabilities</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>051 - Disclosure - NET INCOME PER SHARE FROM CONTINUING OPERATIONS (Details) - Schedule of Earnings Per Share, Basic and Diluted</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofEarningsPerShareBasicandDilutedTable</Role>
      <ShortName>NET INCOME PER SHARE FROM CONTINUING OPERATIONS (Details) - Schedule of Earnings Per Share, Basic and Diluted</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/NETINCOMEPERSHAREFROMCONTINUINGOPERATIONSTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>052 - Disclosure - LEASES (Details) - Schedule of Future Minimum Rental Payments for Operating Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofFutureMinimumRentalPaymentsforOperatingLeasesTable</Role>
      <ShortName>LEASES (Details) - Schedule of Future Minimum Rental Payments for Operating Leases</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/LEASESTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>053 - Disclosure - COMMON STOCK (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/COMMONSTOCKDetails</Role>
      <ShortName>COMMON STOCK (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/COMMONSTOCKTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>054 - Disclosure - COMMON STOCK (Details) - Schedule of Stock by Class</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofStockbyClassTable</Role>
      <ShortName>COMMON STOCK (Details) - Schedule of Stock by Class</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/COMMONSTOCKTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>055 - Disclosure - REVOLVING LINES OF CREDIT (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/REVOLVINGLINESOFCREDITDetails</Role>
      <ShortName>REVOLVING LINES OF CREDIT (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/REVOLVINGLINESOFCREDIT</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>056 - Disclosure - DERIVATIVE FINANCIAL INSTRUMENTS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSDetails</Role>
      <ShortName>DERIVATIVE FINANCIAL INSTRUMENTS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>057 - Disclosure - DERIVATIVE FINANCIAL INSTRUMENTS (Details) - Schedule of Fair Values for Derivative Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofFairValuesforDerivativeFinancialInstrumentsTable</Role>
      <ShortName>DERIVATIVE FINANCIAL INSTRUMENTS (Details) - Schedule of Fair Values for Derivative Financial Instruments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>058 - Disclosure - DERIVATIVE FINANCIAL INSTRUMENTS (Details) - Schedule of Gains or Losses of Derivative Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofGainsorLossesofDerivativeFinancialInstrumentsTable</Role>
      <ShortName>DERIVATIVE FINANCIAL INSTRUMENTS (Details) - Schedule of Gains or Losses of Derivative Financial Instruments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>059 - Disclosure - EMPLOYEE BENEFITS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/EMPLOYEEBENEFITSDetails</Role>
      <ShortName>EMPLOYEE BENEFITS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>060 - Disclosure - EMPLOYEE BENEFITS (Details) - Schedule of Non-Vested Restricted Stock Award Activity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofNonVestedRestrictedStockAwardActivityTable</Role>
      <ShortName>EMPLOYEE BENEFITS (Details) - Schedule of Non-Vested Restricted Stock Award Activity</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>061 - Disclosure - EMPLOYEE BENEFITS (Details) - Schedule of Share-based Compensation, Stock Options, Activity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofSharebasedCompensationStockOptionsActivityTable</Role>
      <ShortName>EMPLOYEE BENEFITS (Details) - Schedule of Share-based Compensation, Stock Options, Activity</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>062 - Disclosure - COMMITMENTS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/COMMITMENTSDetails</Role>
      <ShortName>COMMITMENTS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/COMMITMENTS</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>063 - Disclosure - INCOME TAXES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/INCOMETAXESDetails</Role>
      <ShortName>INCOME TAXES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXESTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>064 - Disclosure - INCOME TAXES  (Details) - Schedule of Components of Income Tax Expense</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofComponentsofIncomeTaxExpenseTable</Role>
      <ShortName>INCOME TAXES  (Details) - Schedule of Components of Income Tax Expense</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXESTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>065 - Disclosure - INCOME TAXES  (Details) - Schedule of Deferred Tax Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofDeferredTaxAssetsandLiabilitiesTable</Role>
      <ShortName>INCOME TAXES  (Details) - Schedule of Deferred Tax Assets and Liabilities</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXESTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>066 - Disclosure - INCOME TAXES  (Details) - Schedule of Effective Income Tax Reconciliation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofEffectiveIncomeTaxReconciliationTable</Role>
      <ShortName>INCOME TAXES  (Details) - Schedule of Effective Income Tax Reconciliation</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXESTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>067 - Disclosure - INCOME TAXES  (Details) - Schedule of Unrecognized Tax Benefits Roll Forward</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofUnrecognizedTaxBenefitsRollForwardTable</Role>
      <ShortName>INCOME TAXES  (Details) - Schedule of Unrecognized Tax Benefits Roll Forward</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/INCOMETAXESTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>068 - Disclosure - DISCONTINUED OPERATIONS (Details) - Schedule of Disposal Groups Including Discontinued Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofDisposalGroupsIncludingDiscontinuedOperationsTable</Role>
      <ShortName>DISCONTINUED OPERATIONS (Details) - Schedule of Disposal Groups Including Discontinued Operations</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/DISCONTINUEDOPERATIONSTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>069 - Disclosure - CONTINGENCIES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/CONTINGENCIESDetails</Role>
      <ShortName>CONTINGENCIES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/CONTINGENCIES</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>070 - Disclosure - NET SALES AND REVENUE (Details) - Schedule of Sales of Consolidated Ethanol Plants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofSalesofConsolidatedEthanolPlantsTable</Role>
      <ShortName>NET SALES AND REVENUE (Details) - Schedule of Sales of Consolidated Ethanol Plants</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/NETSALESANDREVENUETables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>071 - Disclosure - QUARTERLY UNAUDITED INFORMATION (Details) - Schedule of Quarterly Financial Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/ScheduleofQuarterlyFinancialInformationTable</Role>
      <ShortName>QUARTERLY UNAUDITED INFORMATION (Details) - Schedule of Quarterly Financial Information</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/QUARTERLYUNAUDITEDINFORMATIONTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>072 - Disclosure - RELATED PARTIES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/RELATEDPARTIESDetails</Role>
      <ShortName>RELATED PARTIES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/RELATEDPARTIES</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="rex-20170131.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>073 - Disclosure - Schedule II - VALUATION AND QUALIFYING ACCOUNTS (Details) - VALUATION AND QUALIFYING ACCOUNTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.rexamerican.com/role/VALUATIONANDQUALIFYINGACCOUNTSTable</Role>
      <ShortName>Schedule II - VALUATION AND QUALIFYING ACCOUNTS (Details) - VALUATION AND QUALIFYING ACCOUNTS</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS</ParentRole>
      <Position>74</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>rex-20170131.xml</File>
    <File>rex-20170131.xsd</File>
    <File>rex-20170131_cal.xml</File>
    <File>rex-20170131_def.xml</File>
    <File>rex-20170131_lab.xml</File>
    <File>rex-20170131_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies/>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
