<?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>006170 - Disclosure - Subsequent events</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/2010 - 12/31/2010
USD ($)

USD ($) / shares
</KeyName><CurrencySymbol>$</CurrencySymbol><contextRef><ContextID>c00026</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0000935494</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2010-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2010-12-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="12 Months Ended" /><Label Id="2" Label="Dec. 31, 2010" /></Labels></Column></Columns><Rows><Row><Id>2</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><Level>0</Level><ElementName>nati_NotesToFinancialStatementsAbstract</ElementName><ElementPrefix>nati</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_ScheduleOfSubsequentEventsTextBlock</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>terselabel</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 16 &amp;#8211; Subsequent events&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: 18pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="left"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt"&gt;We have evaluated subsequent events through the date the financial statements were issued.&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: 27pt; 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;On January 21, 2011, our Board of Directors declared a quarterly cash dividend of $0.15 per common share, payable February 21, 2011, to shareholders of record on February 4, 2011.&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: 27pt; 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;On January 21, 2011, our Board of Directors declared a 3 for 2 stock split to be effected as a stock dividend, payable February 21, 2011, to shareholders of record on February 4, 2011. All share and per-share data in this Form 10-K is presented prior to this split.&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: 27pt; 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;On January 21, 2011, our Board of Directors approved 2,000,000 additional shares of our common stock for issuance under our Employee Stock Purchase Plan. This proposal will be presented for approval to our stockholders during our stockholder&amp;#8217;s meeting to be held on May 10, 2011.&lt;/font&gt;&lt;/div&gt;&lt;div style="TEXT-INDENT: 0pt; DISPLAY: block"&gt;&lt;br /&gt;&lt;/div&gt;</NonNumbericText><NonNumericTextHeader>Note 16 &amp;#8211; Subsequent eventsWe have evaluated subsequent events through the date the financial statements were issued.On January 21, 2011, our Board of</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>Describes disclosed significant events or transactions that occurred after the balance sheet date, but before the issuance of the financial statements. Examples include: the sale of a capital stock issue, purchase of a business, settlement of litigation, losses resulting from fire or flood, losses on receivables, significant realized and unrealized gains and losses that result from changes in quoted market prices of securities, declines in market prices of inventory, changes in authorized or issued debt (SEC), significant foreign exchange rate changes, substantial loans to insiders or affiliates, significant long-term investments, and substantial dividends not in the ordinary course of business.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 5
 -Paragraph 11

</ElementReferences><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Subsequent events</Label></Row></Rows><Footnotes /><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows><ReportName>Subsequent events</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>false</HasCustomUnits><SharesShouldBeRounded>true</SharesShouldBeRounded></InstanceReport>
