<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.1.u1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>291</ContextCount>
  <ElementCount>348</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>106</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DocumentandEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Statement - Consolidated Statements of Operations (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementsofOperationsunaudited</Role>
      <ShortName>Consolidated Statements of Operations (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Statements of Comprehensive Income (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementsofComprehensiveIncomeunaudited</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statements of Cash Flows (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementsofCashFlowsunaudited</Role>
      <ShortName>Consolidated Statements of Cash Flows (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statement of Stockholders' Equity (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementofStockholdersEquityunaudited</Role>
      <ShortName>Consolidated Statement of Stockholders' Equity (unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Consolidated Statements of Operations Parenthetical</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementsofOperationsParenthetical</Role>
      <ShortName>Consolidated Statements of Operations Parenthetical</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - Consolidated Statements of Comprehensive Income Parenthetical</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ConsolidatedStatementsofComprehensiveIncomeParenthetical</Role>
      <ShortName>Consolidated Statements of Comprehensive Income Parenthetical</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Acquisitions and Discontinued Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AcquisitionsandDiscontinuedOperations</Role>
      <ShortName>Acquisitions and Discontinued Operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Derivative Instruments and Fair Value Accounting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccounting</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Partially-Owned Subsidiaries</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/PartiallyOwnedSubsidiaries</Role>
      <ShortName>Partially-Owned Subsidiaries</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Railcar Leasing and Services Group</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroup</Role>
      <ShortName>Railcar Leasing and Services Group</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Property, Plant, and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/PropertyPlantandEquipment</Role>
      <ShortName>Property, Plant, and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Employee Retirement Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EmployeeRetirementPlans</Role>
      <ShortName>Employee Retirement Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Accumulated Other Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AccumulatedOtherComprehensiveLoss</Role>
      <ShortName>Accumulated Other Comprehensive Loss</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Common Stock and Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/CommonStockandStockBasedCompensation</Role>
      <ShortName>Common Stock and Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Earnings Per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EarningsPerCommonShare</Role>
      <ShortName>Earnings Per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/Contingencies</Role>
      <ShortName>Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccounting</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Common Stock and Stock-Based Compensation Stockholders Equity (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/CommonStockandStockBasedCompensationStockholdersEquityPolicies</Role>
      <ShortName>Common Stock and Stock-Based Compensation Stockholders Equity (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccounting</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Derivative Instruments and Fair Value Accounting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingTables</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccounting</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/SegmentInformation</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Railcar Leasing and Services Group (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupTables</Role>
      <ShortName>Railcar Leasing and Services Group (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/RailcarLeasingandServicesGroup</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Property, Plant, and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/PropertyPlantandEquipmentTables</Role>
      <ShortName>Property, Plant, and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/PropertyPlantandEquipment</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/Debt</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - Employee Retirement Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EmployeeRetirementPlansTables</Role>
      <ShortName>Employee Retirement Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/EmployeeRetirementPlans</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AccumulatedOtherComprehensiveLossTables</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/AccumulatedOtherComprehensiveLoss</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Common Stock and Stock-Based Compensation Stock Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/CommonStockandStockBasedCompensationStockBasedCompensationTables</Role>
      <ShortName>Common Stock and Stock-Based Compensation Stock Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Earnings Per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EarningsPerCommonShareTables</Role>
      <ShortName>Earnings Per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.trin.net/role/EarningsPerCommonShare</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Summary of Significant Accounting Policies Revenue Recognition and Remaining performance obligation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesRevenueRecognitionandRemainingperformanceobligationDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Revenue Recognition and Remaining performance obligation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Summary of Significant Accounting Policies Lessee Accounting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesLesseeAccountingDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Lessee Accounting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Summary of Significant Accounting Policies Lessor Accounting (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesLessorAccountingDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Lessor Accounting (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Summary of Significant Accounting Policies Receivables (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesReceivablesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Receivables (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Summary of Significant Accounting Policies SCF Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesSCFProgramDetails</Role>
      <ShortName>Summary of Significant Accounting Policies SCF Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Summary of Significant Accounting Policies Goodwill (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesGoodwillDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Goodwill (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Summary of Significant Accounting Policies Warranties (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SummaryofSignificantAccountingPoliciesWarrantiesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies Warranties (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Acquisitions and Discontinued Operations - Acquisitions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AcquisitionsandDiscontinuedOperationsAcquisitionsDetails</Role>
      <ShortName>Acquisitions and Discontinued Operations - Acquisitions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Acquisitions and Discontinued Operations - Discontinued Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AcquisitionsandDiscontinuedOperationsDiscontinuedOperationsDetails</Role>
      <ShortName>Acquisitions and Discontinued Operations - Discontinued Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Derivative Instruments and Fair Value Accounting Derivative Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingDerivativeInstrumentsDetails</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting Derivative Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Derivative Instruments and Fair Value Accounting Derivative Effect on Interest (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingDerivativeEffectonInterestDetails</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting Derivative Effect on Interest (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Derivative Instruments and Fair Value Accounting FX Hedge (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingFXHedgeDetails</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting FX Hedge (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Derivatives Not Designated as Hedging Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativesNotDesignatedasHedgingInstrumentsDetails</Role>
      <ShortName>Derivatives Not Designated as Hedging Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Derivative Instruments and Fair Value Accounting - Recurring Fair Value Measurement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DerivativeInstrumentsandFairValueAccountingRecurringFairValueMeasurementDetails</Role>
      <ShortName>Derivative Instruments and Fair Value Accounting - Recurring Fair Value Measurement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Segment Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SegmentInformationNarrativeDetails</Role>
      <ShortName>Segment Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Segment Information - Financial information for segments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/SegmentInformationFinancialinformationforsegmentsDetails</Role>
      <ShortName>Segment Information - Financial information for segments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Partially-Owned Subsidiaries - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/PartiallyOwnedSubsidiariesNarrativeDetails</Role>
      <ShortName>Partially-Owned Subsidiaries - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - Railcar Leasing and Services Group - Selected Income Statement Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupSelectedIncomeStatementInformationDetails</Role>
      <ShortName>Railcar Leasing and Services Group - Selected Income Statement Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - Railcar Leasing and Services Group - Lease Portfolio Sales (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupLeasePortfolioSalesDetails</Role>
      <ShortName>Railcar Leasing and Services Group - Lease Portfolio Sales (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9954502 - Disclosure - Railcar Leasing and Services Group - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupNarrativeDetails</Role>
      <ShortName>Railcar Leasing and Services Group - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9954503 - Disclosure - Railcar Leasing and Services Group - Wholly-owned &amp; Partially-owned Future Rental Revenues (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupWhollyownedPartiallyownedFutureRentalRevenuesDetails</Role>
      <ShortName>Railcar Leasing and Services Group - Wholly-owned &amp; Partially-owned Future Rental Revenues (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9954504 - Disclosure - Railcar Leasing and Services Group - Other Operating Lease Obligations &amp; Future Revenues (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/RailcarLeasingandServicesGroupOtherOperatingLeaseObligationsFutureRevenuesDetails</Role>
      <ShortName>Railcar Leasing and Services Group - Other Operating Lease Obligations &amp; Future Revenues (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9954505 - Disclosure - Property, Plant, and Equipment - Components of property, plant, and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/PropertyPlantandEquipmentComponentsofpropertyplantandequipmentDetails</Role>
      <ShortName>Property, Plant, and Equipment - Components of property, plant, and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9954506 - Disclosure - Debt - Components of debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DebtComponentsofdebtDetails</Role>
      <ShortName>Debt - Components of debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9954507 - Disclosure - Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/DebtNarrativeDetails</Role>
      <ShortName>Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9954508 - Disclosure - Income Taxes Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/IncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9954509 - Disclosure - Employee Retirement Plans - Components of net retirement cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EmployeeRetirementPlansComponentsofnetretirementcostDetails</Role>
      <ShortName>Employee Retirement Plans - Components of net retirement cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9954510 - Disclosure - Accumulated Other Comprehensive Loss - Changes in accumulated other comprehensive loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/AccumulatedOtherComprehensiveLossChangesinaccumulatedothercomprehensivelossDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss - Changes in accumulated other comprehensive loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9954511 - Disclosure - Common Stock and Stock-Based Compensation Stockholders Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/CommonStockandStockBasedCompensationStockholdersEquityDetails</Role>
      <ShortName>Common Stock and Stock-Based Compensation Stockholders Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.trin.net/role/CommonStockandStockBasedCompensationStockholdersEquityPolicies</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9954512 - Disclosure - Common Stock and Stock-Based Compensation Stock-based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/CommonStockandStockBasedCompensationStockbasedCompensationDetails</Role>
      <ShortName>Common Stock and Stock-Based Compensation Stock-based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9954513 - Disclosure - Earnings Per Common Share - EPS calculation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/EarningsPerCommonShareEPScalculationDetails</Role>
      <ShortName>Earnings Per Common Share - EPS calculation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="trn-20240331.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9954514 - Disclosure - Contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.trin.net/role/ContingenciesNarrativeDetails</Role>
      <ShortName>Contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 1 fact(s) appearing in ix:hidden were eligible for transformation: dei:EntityRegistrantName -  trn-20240331.htm 4</Log>
    <Log type="Warning">[rq-1206-Multiple-Root-Nodes] Presentation group ''Derivative Instruments and Fair Value Accounting'' has multiple root nodes. XBRL allows unordered root nodes, but rendering requires ordering.  They will instead be ordered by their labels.  To avoid undesirable ordering of axes and primary items across multiple root nodes, rearrange the presentation relationships to have only a single root node.</Log>
    <Log type="Warning">[rq-1206-Multiple-Root-Nodes] Presentation group ''Derivative Instruments and Fair Value Accounting (Tables)'' has multiple root nodes. XBRL allows unordered root nodes, but rendering requires ordering.  They will instead be ordered by their labels.  To avoid undesirable ordering of axes and primary items across multiple root nodes, rearrange the presentation relationships to have only a single root node.</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="trn-20240331.htm">trn-20240331.htm</File>
    <File>trn-20240331.xsd</File>
    <File>trn-20240331_cal.xml</File>
    <File>trn-20240331_def.xml</File>
    <File>trn-20240331_lab.xml</File>
    <File>trn-20240331_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>trn-20240331_g1.jpg</File>
    <File>trn-20240331_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="855">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
