<?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>0220 - 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>Jan-01-2010_Dec-31-2010</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001113481</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>USD</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>Shares</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>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></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>mdco_SubsequentEventsAbstract</ElementName><ElementPrefix>mdco</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>Subsequent events.</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>Subsequent events.</ElementDefenition><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Subsequent Events [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>verboselabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell><Id>1</Id><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 20 - us-gaap:ScheduleOfSubsequentEventsTextBlock--&gt;
   &lt;div style="margin-left: 0%"&gt;
   &lt;div style="margin-top: 12pt; font-size: 1pt"&gt;&amp;#160;
   &lt;/div&gt;
   &lt;table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size: 10pt; font-family: Arial, Helvetica; color: #0c1c47; background: transparent; text-align: left"&gt;
   &lt;tr&gt;
       &lt;td width="5%"&gt;&lt;/td&gt;
       &lt;td width="95%"&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr valign="top"&gt;
       &lt;td&gt;
       &lt;b&gt;&lt;font style="font-family: 'Times New Roman', Times"&gt;20.&amp;#160;&amp;#160;&lt;/font&gt;&lt;/b&gt;
   &lt;/td&gt;
       &lt;td&gt;
       &lt;b&gt;&lt;font style="font-family: 'Times New Roman', Times"&gt;Subsequent
       Events&lt;/font&gt;&lt;/b&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
   &lt;div style="margin-top: 6pt; font-size: 1pt"&gt;&amp;#160;
   &lt;/div&gt;
   &lt;div align="left" style="margin-left: 0%; margin-right: 0%; text-indent: 4%; font-size: 10pt; font-family: 'Times New Roman', Times; color: #0c1c47; background: transparent"&gt;
       On February&amp;#160;11, 2011, the Company entered into a Settlement
       Agreement and Release (the Settlement Agreement) with WilmerHale
       with respect to all potential claims and causes of action
       between the parties
   related to the &amp;#8216;404 patent, the extension of the term of
       the &amp;#8216;404 patent, any alleged late filing of the request for
       an extension of the term of the &amp;#8216;404 patent and any efforts
       to cure such alleged late filing.
   &lt;/div&gt;
   &lt;div style="margin-top: 6pt; font-size: 1pt"&gt;&amp;#160;
   &lt;/div&gt;
   &lt;div align="left" style="margin-left: 0%; margin-right: 0%; text-indent: 4%; font-size: 10pt; font-family: 'Times New Roman', Times; color: #0c1c47; background: transparent"&gt;
       Under the Settlement Agreement, WilmerHale agreed to make
       available to the Company up to approximately $232&amp;#160;million,
       consisting of approximately $117&amp;#160;million from the proceeds
       of professional liability insurance policies and
       $115&amp;#160;million of payments from WilmerHale itself. As
       described below, a portion of the available funds will be paid
       to the Company shortly after entry into the Settlement
       Agreement, but most of the available funds would be paid only if
       the Company suffers damages in the event that a generic version
       of the Company&amp;#8217;s product bivalirudin is sold in the United
       States before June&amp;#160;15, 2015 because the extension of the
       &amp;#8216;404 patent is held invalid on the basis that the
       application for the extension was not timely filed. While the
       Company believes that the extension of the &amp;#8216;404 patent will
       be upheld, the court decision ordering the PTO to accept the
       extension application as timely filed remains open to future
       challenge, including in a pending appeal by a generic company.
       Payments by WilmerHale itself would be made only after payments
       from its insurance policies are exhausted and cannot exceed
       $2.875&amp;#160;million for any calendar quarter.
   &lt;/div&gt;
   &lt;div style="margin-top: 6pt; font-size: 1pt"&gt;&amp;#160;
   &lt;/div&gt;
   &lt;div align="left" style="margin-left: 0%; margin-right: 0%; text-indent: 4%; font-size: 10pt; font-family: 'Times New Roman', Times; color: #0c1c47; background: transparent"&gt;
       Pursuant to the Settlement Agreement, WilmerHale has agreed to
       pay approximately $18&amp;#160;million from its professional
       liability insurance providers to the Company within 60&amp;#160;days
       after the date of the Settlement Agreement. The balance of the
       approximately $232&amp;#160;million aggregate amount provided in the
       Settlement Agreement remains available to pay (1)&amp;#160;future
       expenses incurred by the Company in continuing to defend the
       extension of the &amp;#8216;404 patent, and (2)&amp;#160;any damages that
       may be suffered by the Company in the event that a generic
       version of the Company&amp;#8217;s product bivalirudin is sold in the
       United States before June&amp;#160;15, 2015 because the extension of
       the &amp;#8216;404 patent is held invalid on the basis that the
       application for the extension was not timely filed. The
       Settlement Agreement contains a formula for determining the
       amount of damages suffered, on a quarterly basis, in the event
       of generic entry. The Settlement Agreement also contains
       provisions under which the Company will seek to recover damages
       from third parties potentially liable to the Company and to
       reimburse or share with WilmerHale certain damage recoveries
       from such third parties.
   &lt;/div&gt;
   &lt;div style="margin-top: 6pt; font-size: 1pt"&gt;&amp;#160;
   &lt;/div&gt;
   &lt;div align="left" style="margin-left: 0%; margin-right: 0%; text-indent: 4%; font-size: 10pt; font-family: 'Times New Roman', Times; color: #0c1c47; background: transparent"&gt;
       The Company and WilmerHale also agreed to a mutual release of
       claims arising from or relating to the &amp;#8216;404 patent, the
       extension of the term of the &amp;#8216;404 patent, any alleged late
       filing of any request for an extension of the term of the
       &amp;#8216;404 patent, any efforts to cure such alleged late filing
       or any related matter, other than obligations set forth in the
       Settlement Agreement. The Settlement Agreement also contains
       provisions including indemnification, confidentiality, dispute
       resolution and other customary provisions for an agreement of
       this kind.
   &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 /><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>
