<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>218</ContextCount>
  <ElementCount>459</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>78</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>11</UnitCount>
  <MyReports>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - Unaudited Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/UnauditedConsolidatedStatementsofOperations</Role>
      <ShortName>Unaudited Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - Unaudited Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/UnauditedConsolidatedStatementsofComprehensiveIncomeLoss</Role>
      <ShortName>Unaudited Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - Unaudited Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/UnauditedConsolidatedStatementsofStockholdersEquity</Role>
      <ShortName>Unaudited Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - Unaudited Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/UnauditedConsolidatedStatementsofCashFlows</Role>
      <ShortName>Unaudited Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Background and liquidity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Backgroundandliquidity</Role>
      <ShortName>Background and liquidity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Basis of presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Basisofpresentation</Role>
      <ShortName>Basis of presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Summaryofsignificantaccountingpolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Composition of certain financial statement captions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Compositionofcertainfinancialstatementcaptions</Role>
      <ShortName>Composition of certain financial statement captions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Revenue and contract costs</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Revenueandcontractcosts</Role>
      <ShortName>Revenue and contract costs</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Debt and finance leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Debtandfinanceleases</Role>
      <ShortName>Debt and finance leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Stockholders' equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Stockholdersequity</Role>
      <ShortName>Stockholders' equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Equity-based compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Equitybasedcompensation</Role>
      <ShortName>Equity-based compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Fair value measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Fairvaluemeasurements</Role>
      <ShortName>Fair value measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Commitmentsandcontingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Incometaxes</Role>
      <ShortName>Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Net income (loss) per share attributable to common stockholders</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Netincomelosspershareattributabletocommonstockholders</Role>
      <ShortName>Net income (loss) per share attributable to common stockholders</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Related party transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Relatedpartytransactions</Role>
      <ShortName>Related party transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Segments and geographic information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Segmentsandgeographicinformation</Role>
      <ShortName>Segments and geographic information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Derivative instruments and hedging activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Derivativeinstrumentsandhedgingactivities</Role>
      <ShortName>Derivative instruments and hedging activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952173 - Disclosure - Acquisition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Acquisition</Role>
      <ShortName>Acquisition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9952174 - Disclosure - Securitization program and variable interest entities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Securitizationprogramandvariableinterestentities</Role>
      <ShortName>Securitization program and variable interest entities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9952175 - Disclosure - Subsequent events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/Subsequentevents</Role>
      <ShortName>Subsequent events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.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>27</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SummaryofsignificantaccountingpoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Composition of certain financial statement captions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsTables</Role>
      <ShortName>Composition of certain financial statement captions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Compositionofcertainfinancialstatementcaptions</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Revenue and contract costs (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/RevenueandcontractcostsTables</Role>
      <ShortName>Revenue and contract costs (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Revenueandcontractcosts</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Debt and finance leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DebtandfinanceleasesTables</Role>
      <ShortName>Debt and finance leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Debtandfinanceleases</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Stockholders' equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/StockholdersequityTables</Role>
      <ShortName>Stockholders' equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Stockholdersequity</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Equity-based compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationTables</Role>
      <ShortName>Equity-based compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Equitybasedcompensation</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Fair value measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsTables</Role>
      <ShortName>Fair value measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Fairvaluemeasurements</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Leases</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Net income (loss) per share attributable to common stockholders (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/NetincomelosspershareattributabletocommonstockholdersTables</Role>
      <ShortName>Net income (loss) per share attributable to common stockholders (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Netincomelosspershareattributabletocommonstockholders</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Segments and geographic information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SegmentsandgeographicinformationTables</Role>
      <ShortName>Segments and geographic information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Segmentsandgeographicinformation</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Derivative instruments and hedging activities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DerivativeinstrumentsandhedgingactivitiesTables</Role>
      <ShortName>Derivative instruments and hedging activities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Derivativeinstrumentsandhedgingactivities</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Acquisition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/AcquisitionTables</Role>
      <ShortName>Acquisition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Acquisition</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Background and liquidity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/BackgroundandliquidityDetails</Role>
      <ShortName>Background and liquidity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Backgroundandliquidity</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Summary of significant accounting policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SummaryofsignificantaccountingpoliciesDetails</Role>
      <ShortName>Summary of significant accounting policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/SummaryofsignificantaccountingpoliciesPolicies</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Composition of certain financial statement captions - Schedule of Accrued Expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofAccruedExpensesDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Accrued Expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Composition of certain financial statement captions - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Composition of certain financial statement captions - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsNarrativeDetails</Role>
      <ShortName>Composition of certain financial statement captions - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Composition of certain financial statement captions - Schedule of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofIntangibleAssetsDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Composition of certain financial statement captions - Schedule of Estimated Amortization Expense for Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofEstimatedAmortizationExpenseforIntangibleAssetsDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Estimated Amortization Expense for Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Composition of certain financial statement captions - Schedule of Goodwill Roll-Forward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofGoodwillRollForwardDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Goodwill Roll-Forward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Composition of certain financial statement captions - Schedule of Accounts Receivable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofAccountsReceivableDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Accounts Receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Composition of certain financial statement captions - Schedule of Allowance for Doubtful Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofAllowanceforDoubtfulAccountsDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Allowance for Doubtful Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Composition of certain financial statement captions - Schedule of Prepaid and Other Current Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CompositionofcertainfinancialstatementcaptionsScheduleofPrepaidandOtherCurrentAssetsDetails</Role>
      <ShortName>Composition of certain financial statement captions - Schedule of Prepaid and Other Current Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Revenue and contract costs - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/RevenueandcontractcostsNarrativeDetails</Role>
      <ShortName>Revenue and contract costs - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Revenue and contract costs - Schedule of Rollforward of Contract Assets and Contract Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/RevenueandcontractcostsScheduleofRollforwardofContractAssetsandContractLiabilitiesDetails</Role>
      <ShortName>Revenue and contract costs - Schedule of Rollforward of Contract Assets and Contract Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Revenue and contract costs - Schedule of Deferred Contract Acquisition Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/RevenueandcontractcostsScheduleofDeferredContractAcquisitionCostsDetails</Role>
      <ShortName>Revenue and contract costs - Schedule of Deferred Contract Acquisition Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Debt and finance leases - Schedule of Outstanding Finance Lease Liabilities and Other Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DebtandfinanceleasesScheduleofOutstandingFinanceLeaseLiabilitiesandOtherDebtDetails</Role>
      <ShortName>Debt and finance leases - Schedule of Outstanding Finance Lease Liabilities and Other Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Debt and finance leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DebtandfinanceleasesNarrativeDetails</Role>
      <ShortName>Debt and finance leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Debt and finance leases - Schedule of Maturities of Finance Leases and Other Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DebtandfinanceleasesScheduleofMaturitiesofFinanceLeasesandOtherDebtDetails</Role>
      <ShortName>Debt and finance leases - Schedule of Maturities of Finance Leases and Other Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Stockholders' equity - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/StockholdersequityNarrativeDetails</Role>
      <ShortName>Stockholders' equity - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Stockholders' equity - Schedule of Accumulated Other Comprehensive Income (Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/StockholdersequityScheduleofAccumulatedOtherComprehensiveIncomeLossDetails</Role>
      <ShortName>Stockholders' equity - Schedule of Accumulated Other Comprehensive Income (Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Equity-based compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationNarrativeDetails</Role>
      <ShortName>Equity-based compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Equity-based compensation - Schedule of Stock - Based Compensation by Type of Award (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationScheduleofStockBasedCompensationbyTypeofAwardDetails</Role>
      <ShortName>Equity-based compensation - Schedule of Stock - Based Compensation by Type of Award (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Equity-based compensation - Schedule of Stock-Based Compensation in Financial Statements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationScheduleofStockBasedCompensationinFinancialStatementsDetails</Role>
      <ShortName>Equity-based compensation - Schedule of Stock-Based Compensation in Financial Statements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Equity-based compensation - Schedule of Restricted Stock Unit Activity and Market-Based Performance Stock Unit Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationScheduleofRestrictedStockUnitActivityandMarketBasedPerformanceStockUnitActivityDetails</Role>
      <ShortName>Equity-based compensation - Schedule of Restricted Stock Unit Activity and Market-Based Performance Stock Unit Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Equity-based compensation - Schedule of Stock Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/EquitybasedcompensationScheduleofStockOptionActivityDetails</Role>
      <ShortName>Equity-based compensation - Schedule of Stock Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Fair value measurements - Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisDetails</Role>
      <ShortName>Fair value measurements - Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Fair value measurements - Schedule of Reconciliation of Changes in Level 3 Instruments Measured on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsScheduleofReconciliationofChangesinLevel3InstrumentsMeasuredonaRecurringBasisDetails</Role>
      <ShortName>Fair value measurements - Schedule of Reconciliation of Changes in Level 3 Instruments Measured on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Fair value measurements - Schedule of Activity Related to Aggregate Fair Value of Amounts Due to Health Care Providers (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsScheduleofActivityRelatedtoAggregateFairValueofAmountsDuetoHealthCareProvidersDetails</Role>
      <ShortName>Fair value measurements - Schedule of Activity Related to Aggregate Fair Value of Amounts Due to Health Care Providers (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Fair value measurements - Schedule of Range and Weighted‑Average of Significant Unobservable Inputs Used in Level 3 Fair Value Measurements by Asset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsScheduleofRangeandWeightedAverageofSignificantUnobservableInputsUsedinLevel3FairValueMeasurementsbyAssetDetails</Role>
      <ShortName>Fair value measurements - Schedule of Range and Weighted‑Average of Significant Unobservable Inputs Used in Level 3 Fair Value Measurements by Asset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Fair value measurements - Schedule of Range and Weighted‑Average of Significant Unobservable Inputs Used in Level 3 Fair Value Measurements by Liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/FairvaluemeasurementsScheduleofRangeandWeightedAverageofSignificantUnobservableInputsUsedinLevel3FairValueMeasurementsbyLiabilityDetails</Role>
      <ShortName>Fair value measurements - Schedule of Range and Weighted‑Average of Significant Unobservable Inputs Used in Level 3 Fair Value Measurements by Liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/LeasesNarrativeDetails</Role>
      <ShortName>Leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Leases - Schedule of Lease Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/LeasesScheduleofLeaseExpenseDetails</Role>
      <ShortName>Leases - Schedule of Lease Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Leases - Schedule of Maturities of Operating and Finance Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/LeasesScheduleofMaturitiesofOperatingandFinanceLeasesDetails</Role>
      <ShortName>Leases - Schedule of Maturities of Operating and Finance Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Leases - Schedule of Supplemental Cash Flow Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/LeasesScheduleofSupplementalCashFlowInformationDetails</Role>
      <ShortName>Leases - Schedule of Supplemental Cash Flow Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Commitments and contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/CommitmentsandcontingenciesDetails</Role>
      <ShortName>Commitments and contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Commitmentsandcontingencies</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Income taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/IncometaxesDetails</Role>
      <ShortName>Income taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Incometaxes</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Net income (loss) per share attributable to common stockholders - Schedule of Earnings Per Share, Basic and Diluted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/NetincomelosspershareattributabletocommonstockholdersScheduleofEarningsPerShareBasicandDilutedDetails</Role>
      <ShortName>Net income (loss) per share attributable to common stockholders - Schedule of Earnings Per Share, Basic and Diluted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/NetincomelosspershareattributabletocommonstockholdersTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Net income (loss) per share attributable to common stockholders - Schedule of Shares Excluded from Computation of Diluted Net Income (Loss) Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/NetincomelosspershareattributabletocommonstockholdersScheduleofSharesExcludedfromComputationofDilutedNetIncomeLossPerShareDetails</Role>
      <ShortName>Net income (loss) per share attributable to common stockholders - Schedule of Shares Excluded from Computation of Diluted Net Income (Loss) Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/NetincomelosspershareattributabletocommonstockholdersTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Related party transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/RelatedpartytransactionsDetails</Role>
      <ShortName>Related party transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Relatedpartytransactions</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Segments and geographic information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SegmentsandgeographicinformationNarrativeDetails</Role>
      <ShortName>Segments and geographic information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Segments and geographic information - Schedule of Expenditures on Long-Lived Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SegmentsandgeographicinformationScheduleofExpendituresonLongLivedAssetsDetails</Role>
      <ShortName>Segments and geographic information - Schedule of Expenditures on Long-Lived Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955563 - Disclosure - Segments and geographic information - Schedule of Other Quantitative Segment Disclosures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SegmentsandgeographicinformationScheduleofOtherQuantitativeSegmentDisclosuresDetails</Role>
      <ShortName>Segments and geographic information - Schedule of Other Quantitative Segment Disclosures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9955564 - Disclosure - Derivative instruments and hedging activities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DerivativeinstrumentsandhedgingactivitiesNarrativeDetails</Role>
      <ShortName>Derivative instruments and hedging activities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9955565 - Disclosure - Derivative instruments and hedging activities - Schedule of Fair Values Of Outstanding Derivative Foreign Currency Forward Contract (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DerivativeinstrumentsandhedgingactivitiesScheduleofFairValuesOfOutstandingDerivativeForeignCurrencyForwardContractDetails</Role>
      <ShortName>Derivative instruments and hedging activities - Schedule of Fair Values Of Outstanding Derivative Foreign Currency Forward Contract (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9955566 - Disclosure - Derivative instruments and hedging activities - Schedule of Effect of Derivative Instruments on the Company’s Consolidated Statements of Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DerivativeinstrumentsandhedgingactivitiesScheduleofEffectofDerivativeInstrumentsontheCompanysConsolidatedStatementsofOperationsDetails</Role>
      <ShortName>Derivative instruments and hedging activities - Schedule of Effect of Derivative Instruments on the Company’s Consolidated Statements of Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9955567 - Disclosure - Derivative instruments and hedging activities - Schedule of Pre-tax Gains (Losses) Associated with Cash Flow Hedges (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/DerivativeinstrumentsandhedgingactivitiesScheduleofPretaxGainsLossesAssociatedwithCashFlowHedgesDetails</Role>
      <ShortName>Derivative instruments and hedging activities - Schedule of Pre-tax Gains (Losses) Associated with Cash Flow Hedges (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9955568 - Disclosure - Acquisition - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/AcquisitionNarrativeDetails</Role>
      <ShortName>Acquisition - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9955569 - Disclosure - Acquisition - Schedule of Business Combination Pro Forma Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/AcquisitionScheduleofBusinessCombinationProFormaInformationDetails</Role>
      <ShortName>Acquisition - Schedule of Business Combination Pro Forma Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9955570 - Disclosure - Securitization program and variable interest entities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SecuritizationprogramandvariableinterestentitiesDetails</Role>
      <ShortName>Securitization program and variable interest entities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Securitizationprogramandvariableinterestentities</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="phr-20260430.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9955571 - Disclosure - Subsequent events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.phreesia.com/role/SubsequenteventsDetails</Role>
      <ShortName>Subsequent events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.phreesia.com/role/Subsequentevents</ParentRole>
      <Position>88</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="phr-20260430.htm">phr-20260430.htm</File>
    <File>phr-20260430.xsd</File>
    <File>phr-20260430_cal.xml</File>
    <File>phr-20260430_def.xml</File>
    <File>phr-20260430_lab.xml</File>
    <File>phr-20260430_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="835">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
