<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Version>2.2.0.25</Version><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><ReportLongName>006140 - Disclosure - Stock-based Compensation</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelColumn>false</LabelColumn><CurrencyCode>USD</CurrencyCode><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName>1/1/2011 - 3/31/2011
USD ($)

USD ($) / shares
</KeyName><CurrencySymbol>$</CurrencySymbol><contextRef><ContextID>c00018</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0000792987</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2011-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2011-03-31T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS><UnitProperty><UnitID>u000</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.xbrl.org/2003/iso4217</MeasureSchema><MeasureValue>USD</MeasureValue><MeasureNamespace>iso4217</MeasureNamespace></StandardMeasure><Scale>0</Scale></UnitProperty><UnitProperty><UnitID>u001</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.xbrl.org/2003/instance</MeasureSchema><MeasureValue>shares</MeasureValue><MeasureNamespace>xbrli</MeasureNamespace></StandardMeasure><Scale>0</Scale></UnitProperty><UnitProperty><UnitID>u002</UnitID><UnitType>Divide</UnitType><NumeratorMeasure><MeasureSchema>http://www.xbrl.org/2003/iso4217</MeasureSchema><MeasureValue>USD</MeasureValue><MeasureNamespace>iso4217</MeasureNamespace></NumeratorMeasure><DenominatorMeasure><MeasureSchema>http://www.xbrl.org/2003/instance</MeasureSchema><MeasureValue>shares</MeasureValue><MeasureNamespace>xbrli</MeasureNamespace></DenominatorMeasure><Scale>0</Scale></UnitProperty></UPS><CurrencyCode>USD</CurrencyCode><OriginalCurrencyCode>USD</OriginalCurrencyCode></MCU><CurrencySymbol>$</CurrencySymbol><Labels><Label Id="1" Label="3 Months Ended" /><Label Id="2" Label="Mar. 31, 2011" /></Labels></Column></Columns><Rows><Row><Id>2</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><Level>0</Level><ElementName>aste_NotesToFinancialStatementsAbstract</ElementName><ElementPrefix>aste</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>No definition available.</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole /><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><NonNumericTextHeader /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>No definition available.</ElementDefenition><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Notes to Financial Statements [Abstract]</Label></Row><Row><Id>3</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><Level>0</Level><ElementName>us-gaap_DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock</ElementName><ElementPrefix>us-gaap</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>No definition available.</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole /><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div style="TEXT-INDENT: 0pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="left"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt; FONT-WEIGHT: bold"&gt;Note 13.&amp;#160;&amp;#160;Shareholders&amp;#8217; Equity&lt;/font&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 36pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt"&gt;Under terms of the Company&amp;#8217;s stock option plans, officers and certain other employees were granted options to purchase the Company&amp;#8217;s common stock at no less than 100% of the market price on the date the option was granted.&amp;#160;&amp;#160;No additional options can be granted under these plans; however the Company has reserved unissued shares of common stock for the exercise of the 91,323 unexercised and outstanding options as of March 31, 2011 under these employee plans.&amp;#160;&amp;#160;All options granted under these plans vested prior to 2007.&lt;/font&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 0pt; DISPLAY: block"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 36pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt"&gt;In addition, a Non-employee Directors Stock Incentive Plan has been established to allow non-employee directors to have a personal financial stake in the Company through an ownership interest.&amp;#160;&amp;#160;Directors may elect to receive their compensation in cash, common stock, deferred stock or stock options.&amp;#160;&amp;#160;Options granted under the Non-employee Directors Stock Incentive Plan vest and become fully exercisable immediately.&amp;#160;&amp;#160;All stock options have a 10-year term.&amp;#160;&amp;#160;The shares reserved under the 1998 Non-Employee Directors Stock Incentive Plan total 140,063 as of March 31, 2011, of which 132,210 shares are available for future grants of stock or deferred stock to directors.&amp;#160;&amp;#160;No additional options can be granted under this plan.&amp;#160;&amp;#160;The fair value of stock awards granted to non-employee directors totaled $58,000 and $42,000 during the three-month periods ended March 31, 2011 and 2010, respectively.&lt;/font&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 0pt; DISPLAY: block"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 36pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt"&gt;In 2006, the Company adopted a five-year plan to award key members of management restricted stock units (&amp;#8220;RSU&amp;#8217;s&amp;#8221;) each year under the Company&amp;#8217;s 2006 Incentive Plan.&amp;#160;&amp;#160;The plan allowed the Company to grant up to 700,000 RSU&amp;#8217;s to employees based upon the annual performance of individual subsidiaries and&amp;#160;&amp;#160;the Company as a whole during each of the five years ended December 31, 2010.&amp;#160;&amp;#160;Additional RSU&amp;#8217;s were granted in 2011 based upon cumulative five-year performance.&amp;#160;&amp;#160;Generally, each award will vest at the end of five years from its date of grant, or at the time a recipient retires after reaching age 65, if earlier.&amp;#160;&amp;#160;In early 2011, a subsequent plan was formulated under the Company&amp;#8217;s 2011 Incentive Plan which was approved by the Company&amp;#8217;s shareholders in their annual meeting held in April 2011.&amp;#160;&amp;#160;This plan also allows the Company to grant up to 700,000 RSU&amp;#8217;s to employees and will operate in a similar fashion to the 2006 Incentive Plan for each of the five years ending December 31, 2015.&amp;#160;&amp;#160;Compensation expense of $865,000 and $591,000 has been recorded in the three-month periods ended March 31, 2011 and 2010, respectively, to reflect the fair value of the total shares granted or expected to be granted under both plans, amortized over the portion of the vesting period occurring during the periods.&amp;#160;&amp;#160;The fair value of the RSU&amp;#8217;s that vested in the three-month period ending March 31, 2011 was $115,000.&lt;/font&gt;&lt;/div&gt;</NonNumbericText><NonNumericTextHeader>Note 13.&amp;#160;&amp;#160;Shareholders&amp;#8217; EquityUnder terms of the Company&amp;#8217;s stock option plans, officers and certain other employees were granted options</NonNumericTextHeader><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>us-types:textBlockItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>Disclosure of compensation-related costs for share-based compensation which may include disclosure of policies, compensation plan details, allocation of stock compensation, incentive distributions, share-based arrangements to obtain goods and services, deferred compensation arrangements, employee stock ownership plan details and employee stock purchase plan details.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 123R
 -Paragraph 64, 65, A240

Reference 2: http://www.xbrl.org/2003/role/presentationRef
 -Publisher AICPA
 -Name Statement of Position (SOP)
 -Number 93-6
 -Paragraph 53

Reference 3: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Staff Accounting Bulletin (SAB)
 -Number Topic 14

</ElementReferences><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Shareholders' Equity</Label></Row></Rows><Footnotes /><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows><ReportName>Stock-based Compensation</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>false</HasCustomUnits><SharesShouldBeRounded>true</SharesShouldBeRounded></InstanceReport>
