﻿<?xml version="1.0" encoding="utf-8"?>
<InstanceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Version>2.2.0.7</Version>
  <hasSegments>false</hasSegments>
  <ReportName>Stockholders' equity</ReportName>
  <ReportLongName>0206 - Disclosure - Stockholders' equity</ReportLongName>
  <DisplayLabelColumn>true</DisplayLabelColumn>
  <ShowElementNames>false</ShowElementNames>
  <RoundingOption />
  <HasEmbeddedReports>false</HasEmbeddedReports>
  <Columns>
    <Column>
      <LabelColumn>false</LabelColumn>
      <Id>1</Id>
      <Labels>
        <Label Id="1" Label="6 Months Ended" />
        <Label Id="2" Label="Jun. 30, 2010" />
      </Labels>
      <CurrencyCode>USD</CurrencyCode>
      <FootnoteIndexer />
      <hasSegments>false</hasSegments>
      <hasScenarios>false</hasScenarios>
      <Segments />
      <Scenarios />
      <Units>
        <Unit>
          <UnitID>USD</UnitID>
          <UnitType>Standard</UnitType>
          <StandardMeasure>
            <MeasureSchema>http://www.xbrl.org/2003/iso4217</MeasureSchema>
            <MeasureValue>USD</MeasureValue>
            <MeasureNamespace>iso4217</MeasureNamespace>
          </StandardMeasure>
          <Scale>0</Scale>
        </Unit>
        <Unit>
          <UnitID>USDEPS</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>
        </Unit>
        <Unit>
          <UnitID>Shares</UnitID>
          <UnitType>Standard</UnitType>
          <StandardMeasure>
            <MeasureSchema>http://www.xbrl.org/2003/instance</MeasureSchema>
            <MeasureValue>shares</MeasureValue>
            <MeasureNamespace>xbrli</MeasureNamespace>
          </StandardMeasure>
          <Scale>0</Scale>
        </Unit>
      </Units>
      <CurrencySymbol>$</CurrencySymbol>
    </Column>
  </Columns>
  <Rows>
    <Row>
      <Id>2</Id>
      <Label>Stockholders' equity [Abstract]</Label>
      <Level>0</Level>
      <ElementName>us-gaap_StockholdersEquityNoteAbstract</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>
      <IsAbstractGroupTitle>true</IsAbstractGroupTitle>
      <IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow>
      <IsEquityAdjustmentRow>false</IsEquityAdjustmentRow>
      <IsBeginningBalance>false</IsBeginningBalance>
      <IsEndingBalance>false</IsEndingBalance>
      <IsReverseSign>false</IsReverseSign>
      <PreferredLabelRole />
      <IsEPS>false</IsEPS>
      <FootnoteIndexer />
      <Cells>
        <Cell>
          <Id>1</Id>
          <ShowCurrencySymbol>false</ShowCurrencySymbol>
          <IsNumeric>false</IsNumeric>
          <IsRatio>false</IsRatio>
          <DisplayZeroAsNone>false</DisplayZeroAsNone>
          <NumericAmount>0</NumericAmount>
          <RoundedNumericAmount>0</RoundedNumericAmount>
          <NonNumbericText />
          <NonNumericTextHeader />
          <FootnoteIndexer />
          <hasSegments>false</hasSegments>
          <hasScenarios>false</hasScenarios>
          <DisplayDateInUSFormat>false</DisplayDateInUSFormat>
        </Cell>
      </Cells>
      <OriginalInstanceReportColumns />
      <ElementDataType>xbrli:stringItemType</ElementDataType>
      <SimpleDataType>string</SimpleDataType>
      <ElementDefenition>No definition available.</ElementDefenition>
      <IsTotalLabel>false</IsTotalLabel>
    </Row>
    <Row>
      <Id>3</Id>
      <Label>Stockholders' equity</Label>
      <Level>1</Level>
      <ElementName>us-gaap_StockholdersEquityNoteDisclosureTextBlock</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>
      <IsAbstractGroupTitle>false</IsAbstractGroupTitle>
      <IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow>
      <IsEquityAdjustmentRow>false</IsEquityAdjustmentRow>
      <IsBeginningBalance>false</IsBeginningBalance>
      <IsEndingBalance>false</IsEndingBalance>
      <IsReverseSign>false</IsReverseSign>
      <PreferredLabelRole>verboselabel</PreferredLabelRole>
      <IsEPS>false</IsEPS>
      <FootnoteIndexer />
      <Cells>
        <Cell>
          <Id>1</Id>
          <ShowCurrencySymbol>false</ShowCurrencySymbol>
          <IsNumeric>false</IsNumeric>
          <IsRatio>false</IsRatio>
          <DisplayZeroAsNone>false</DisplayZeroAsNone>
          <NumericAmount>0</NumericAmount>
          <RoundedNumericAmount>0</RoundedNumericAmount>
          <NonNumbericText>&lt;!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" --&gt;
   &lt;!-- Begin Block Tagged Note 6 - us-gaap:StockholdersEquityNoteDisclosureTextBlock--&gt;
   &lt;div style="font-family: 'Times New Roman',Times,serif"&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 12pt"&gt;&lt;b&gt;Note F. &lt;/b&gt;&lt;b&gt;&lt;i&gt;Stockholders&amp;#8217; equity&lt;/i&gt;&lt;/b&gt;
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;b&gt;&lt;i&gt;Equity issuance. &lt;/i&gt;&lt;/b&gt;On February&amp;#160;1, 2010, the Company issued 5,347,500 shares of its common stock
   at $42.75 per share. After deducting underwriting discounts of approximately $9.1&amp;#160;million and
   transaction costs, the Company received net proceeds of approximately $219.3&amp;#160;million. The net
   proceeds from this offering were used to repay a portion of the borrowings under the Company&amp;#8217;s
   credit facility.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;b&gt;&lt;i&gt;Treasury stock. &lt;/i&gt;&lt;/b&gt;The restrictions on certain restricted stock awards issued to certain of the
   Company&amp;#8217;s officers, directors and key employees lapsed during the six months ended June&amp;#160;30, 2010.
   Immediately upon the lapse of restrictions, these individuals became liable for income taxes on the
   value of such shares. In accordance with the Company&amp;#8217;s 2006 Stock Incentive Plan and the
   applicable restricted stock award agreements, some of such persons elected to deliver shares of the
   Company&amp;#8217;s common stock to the Company in exchange for cash used to satisfy such tax liability. In
   total, at June&amp;#160;30, 2010 and December&amp;#160;31, 2009, the Company had acquired 23,667 and 12,380 shares,
   respectively, that are held as treasury stock in the approximate amounts of $1.0&amp;#160;million and $0.4
   million, respectively.
   &lt;/div&gt;
   &lt;/div&gt;
</NonNumbericText>
          <NonNumericTextHeader>&lt;!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" --&gt;
   &lt;!-- Begin Block Tagged Note</NonNumericTextHeader>
          <FootnoteIndexer />
          <hasSegments>false</hasSegments>
          <hasScenarios>false</hasScenarios>
          <DisplayDateInUSFormat>false</DisplayDateInUSFormat>
        </Cell>
      </Cells>
      <OriginalInstanceReportColumns />
      <ElementDataType>us-types:textBlockItemType</ElementDataType>
      <SimpleDataType>textblock</SimpleDataType>
      <ElementDefenition>Disclosures related to accounts comprising shareholders' equity, including other comprehensive income.  Includes: (1) balances of common stock, preferred stock, additional paid-in capital, other capital and retained earnings; (2) accumulated balance for each classification of other comprehensive income and total amount of comprehensive income; (3) amount and nature of changes in separate accounts, including the number of shares authorized and outstanding, number of shares issued upon exercise and conversion, and for other comprehensive income, the adjustments for reclassifications to net income; (4) rights and privileges of each class of stock authorized; (5) basis of treasury stock, if other than cost, and amounts paid and accounting treatment for treasury stock purchased significantly in excess of market; (6) dividends paid or payable per share and in the aggregate for each class of stock for each period presented; (7) dividend restrictions and accumulated preferred dividends in arrears (in aggregate and per share amount); (8) retained earnings appropriations or restrictions, such as dividend restrictions; (9) impact of change in accounting principle, initial adoption of new accounting principle and correction of an error in previously issued financial statements; (10) shares held in trust for Employee Stock Ownership Plan (ESOP); (11) deferred compensation related to issuance of capital stock; (12) note received for issuance of stock; (13) unamortized discount on shares; (14) description, terms and number of warrants or rights outstanding; (15) shares under subscription and subscription receivables; effective date of new retained earnings after quasi-reorganization and deficit eliminated by quasi-reorganization and, for a period of at least ten years after the effective date, the point in time from which the new retained dates; and (16) retroactive effective of subsequent change in capital structure.</ElementDefenition>
      <ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 5
 -Paragraph 15

Reference 2: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Regulation S-X (SX)
 -Number 210
 -Section 04
 -Article 3

Reference 3: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Regulation S-X (SX)
 -Number 210
 -Section 08
 -Paragraph d
 -Article 4

Reference 4: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Staff Accounting Bulletin (SAB)
 -Number Topic 4
 -Section C, E

Reference 5: http://www.xbrl.org/2003/role/presentationRef
 -Publisher AICPA
 -Name Accounting Principles Board Opinion (APB)
 -Number 12
 -Paragraph 10

Reference 6: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Regulation S-X (SX)
 -Number 210
 -Section 02
 -Paragraph 29, 30, 31
 -Article 5

Reference 7: http://www.xbrl.org/2003/role/presentationRef
 -Publisher AICPA
 -Name Accounting Research Bulletin (ARB)
 -Number 43
 -Chapter 1
 -Section B
 -Paragraph 7, 11A

Reference 8: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 129
 -Paragraph 2, 3, 4, 5, 6, 7, 8

Reference 9: http://www.xbrl.org/2003/role/presentationRef
 -Publisher SEC
 -Name Regulation S-X (SX)
 -Number 210
 -Section 08
 -Article 4

</ElementReferences>
      <IsTotalLabel>false</IsTotalLabel>
    </Row>
  </Rows>
  <Footnotes />
  <NumberOfCols>1</NumberOfCols>
  <NumberOfRows>2</NumberOfRows>
  <HasScenarios>false</HasScenarios>
  <MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel>
  <SharesRoundingLevel>UnKnown</SharesRoundingLevel>
  <PerShareRoundingLevel>UnKnown</PerShareRoundingLevel>
  <HasPureData>false</HasPureData>
  <SharesShouldBeRounded>true</SharesShouldBeRounded>
</InstanceReport>
