<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:cef="http://xbrl.sec.gov/cef/2024"
  xmlns:dei="http://xbrl.sec.gov/dei/2024"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:pfi="http://www.pimco.com/20241231"
  xmlns:us-gaap="http://fasb.org/us-gaap/2024"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="pfi-20241231.xsd" xlink:type="simple"/>
    <context id="P07_01_2024To12_31_2024">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000908187</identifier>
        </entity>
        <period>
            <startDate>2024-07-01</startDate>
            <endDate>2024-12-31</endDate>
        </period>
    </context>
    <context id="PAsOn12_31_2024">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000908187</identifier>
        </entity>
        <period>
            <instant>2024-12-31</instant>
        </period>
    </context>
    <context id="P07_01_2024To12_31_2024_CommonSharesMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000908187</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">pfi:CommonSharesMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2024-07-01</startDate>
            <endDate>2024-12-31</endDate>
        </period>
    </context>
    <unit id="Unit_shares">
        <measure>shares</measure>
    </unit>
    <unit id="Unit_pure">
        <measure>pure</measure>
    </unit>
    <unit id="Unit_USD_per_Share">
        <divide>
            <unitNumerator>
                <measure>iso4217:USD</measure>
            </unitNumerator>
            <unitDenominator>
                <measure>shares</measure>
            </unitDenominator>
        </divide>
    </unit>
    <dei:EntityCentralIndexKey contextRef="P07_01_2024To12_31_2024" id="ixv-288105">0000908187</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag contextRef="P07_01_2024To12_31_2024" id="ixv-288106">false</dei:AmendmentFlag>
    <dei:DocumentType contextRef="P07_01_2024To12_31_2024" id="hidden132011341">N-CSRS</dei:DocumentType>
    <dei:EntityRegistrantName contextRef="P07_01_2024To12_31_2024" id="ixv-288144">PCM Fund, Inc.</dei:EntityRegistrantName>
    <us-gaap:SharePrice
      contextRef="PAsOn12_31_2024"
      decimals="2"
      id="Fact_132011345"
      unitRef="Unit_USD_per_Share">7.7</us-gaap:SharePrice>
    <us-gaap:NetAssetValuePerShare
      contextRef="PAsOn12_31_2024"
      decimals="2"
      id="Fact_132011346"
      unitRef="Unit_USD_per_Share">6.14</us-gaap:NetAssetValuePerShare>
    <cef:LatestPremiumDiscountToNavPercent
      contextRef="P07_01_2024To12_31_2024"
      decimals="4"
      id="Fact_132011347"
      unitRef="Unit_pure">0.2541</cef:LatestPremiumDiscountToNavPercent>
    <cef:InvestmentObjectivesAndPracticesTextBlock contextRef="P07_01_2024To12_31_2024" id="ixv-1621">&lt;div style="margin-top:6pt; margin-bottom:0pt; text-indent:0%; font-size:9.5pt; font-family:Arial Narrow"&gt;Investment Objective and Strategy Overview &lt;/div&gt;&lt;div style="margin-top:8pt; margin-bottom:0pt; font-size:8.5pt; font-family:Arial Narrow"&gt;The Fund&#x2019;s primary investment objective is to achieve high current income. Capital gain from the disposition of investments is a secondary objective of the Fund. &lt;/div&gt;&lt;div style="font-size:0pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; text-indent:0%; font-size:9.5pt; font-family:Arial Narrow"&gt;Fund Insights at NAV &lt;/div&gt;&lt;div style="margin-top:8pt; margin-bottom:0pt; font-size:8.5pt; font-family:Arial Narrow"&gt;The following affected performance (on a gross basis) during the reporting period: &lt;/div&gt;&lt;div style="font-size:6pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="text-align:start; BORDER-COLLAPSE:COLLAPSE; font-family:Arial Narrow; font-size:8.5pt;border:0;width:100%"&gt;
&lt;tr style="page-break-inside:avoid"&gt;
&lt;td style="width:1%;vertical-align:top;text-align:left"&gt;&#xbb;&lt;/td&gt;
&lt;td style="width:1%;vertical-align:top"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:top;text-align:left"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-family: &amp;quot;Arial Narrow&amp;quot;; font-size: 8.5pt; text-align: left; line-height: normal;"&gt;Exposure to corporate credit, notably high yield and bank loans, contributed to performance, as the asset classes posted positive returns. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="font-size:6pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="text-align:start; BORDER-COLLAPSE:COLLAPSE; font-family:Arial Narrow; font-size:8.5pt;border:0;width:100%"&gt;
&lt;tr style="page-break-inside:avoid"&gt;
&lt;td style="width:1%;vertical-align:top;text-align:left"&gt;&#xbb;&lt;/td&gt;
&lt;td style="width:1%;vertical-align:top"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:top;text-align:left"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-family: &amp;quot;Arial Narrow&amp;quot;; font-size: 8.5pt; text-align: left; line-height: normal;"&gt;Exposure to emerging market debt contributed to performance, as the asset class posted positive returns. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="font-size:6pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="text-align:start; BORDER-COLLAPSE:COLLAPSE; font-family:Arial Narrow; font-size:8.5pt;border:0;width:100%"&gt;
&lt;tr style="page-break-inside:avoid"&gt;
&lt;td style="width:1%;vertical-align:top;text-align:left"&gt;&#xbb;&lt;/td&gt;
&lt;td style="width:1%;vertical-align:top"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:top;text-align:left"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-family: &amp;quot;Arial Narrow&amp;quot;; font-size: 8.5pt; text-align: left; line-height: normal;"&gt;Exposure to residential mortgage securities contributed to performance, as the asset class posted positive returns. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="font-size:6pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="text-align:start; BORDER-COLLAPSE:COLLAPSE; font-family:Arial Narrow; font-size:8.5pt;border:0;width:100%"&gt;
&lt;tr style="page-break-inside:avoid"&gt;
&lt;td style="width:1%;vertical-align:top;text-align:left"&gt;&#xbb;&lt;/td&gt;
&lt;td style="width:1%;vertical-align:top"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:top;text-align:left"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-family: &amp;quot;Arial Narrow&amp;quot;; font-size: 8.5pt; text-align: left; line-height: normal;"&gt;The costs associated with one or more forms of leverage detracted from performance. That said, the net impact on the Fund&#x2019;s performance of the cost of leverage is generally determined by comparing the return on the additional investments purchased with&#160;such leverage against the cost of such&#160;leverage. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="font-size:6pt;margin-top:0pt;margin-bottom:0pt"&gt;&#160;&lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" style="text-align:start; BORDER-COLLAPSE:COLLAPSE; font-family:Arial Narrow; font-size:8.5pt;border:0;width:100%"&gt;
&lt;tr style="page-break-inside:avoid"&gt;
&lt;td style="width:1%;vertical-align:top;text-align:left"&gt;&#xbb;&lt;/td&gt;
&lt;td style="width:1%;vertical-align:top"&gt;&#160;&lt;/td&gt;
&lt;td style="vertical-align:top;text-align:left"&gt;&lt;div style="margin-top: 0pt; margin-bottom: 0pt; font-family: &amp;quot;Arial Narrow&amp;quot;; font-size: 8.5pt; text-align: left; line-height: normal;"&gt;Exposure to asset backed securities detracted from performance, as select securities posted negative returns. &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</cef:InvestmentObjectivesAndPracticesTextBlock>
    <cef:OutstandingSecurityTitleTextBlock
      contextRef="P07_01_2024To12_31_2024_CommonSharesMemberusgaapStatementClassOfStockAxis"
      id="ixv-288148">Common Shares</cef:OutstandingSecurityTitleTextBlock>
    <cef:OutstandingSecurityHeldShares
      contextRef="P07_01_2024To12_31_2024_CommonSharesMemberusgaapStatementClassOfStockAxis"
      decimals="0"
      id="ixv-288149"
      unitRef="Unit_shares">12152</cef:OutstandingSecurityHeldShares>
    <link:footnoteLink
      xlink:role="http://www.xbrl.org/2003/role/link"
      xlink:type="extended">
        <link:loc
          xlink:href="#Fact_132011345"
          xlink:label="Fact_132011345"
          xlink:type="locator"/>
        <link:footnote id="FN_509442" xlink:label="FN_509442" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Performance quoted represents past performance. Past performance is not a guarantee or a reliable indicator of future results. Current performance may be lower or higher than performance shown. Investment return and the principal value of an investment will fluctuate. Returns shown do not reflect the deduction of taxes that a shareholder would pay on Fund distributions or the sale of Fund shares. Total return, market price, NAV, market price distribution rate, and NAV distribution rate will fluctuate with changes in market conditions. The NAV presented may differ from the NAV reported for the same period in other Fund materials. Performance current to the most recent month-end is available at www.pimco.com or via (844) 33-PIMCO. Performance is calculated assuming all dividends and distributions are reinvested at prices obtained under the Fund&#x2019;s dividend reinvestment plan. Performance does not reflect any brokerage commissions in connection with the purchase or sale of Fund shares. Performance of an index is shown in light of a requirement by the Securities and Exchange Commission that the performance of an appropriate broad-based securities market index be disclosed. However, the Fund is not managed to an index nor should the index be viewed as a &#x201c;benchmark&#x201d; for the Fund&#x2019;s performance. The index is not intended to be indicative of the Fund&#x2019;s investment strategies, portfolio components or past or future performance. Please see Additional Information Regarding the Funds for a description of the Fund&#x2019;s principal investment strategies.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact_132011345"
          xlink:to="FN_509442"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact_132011346"
          xlink:label="Fact_132011346"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact_132011346"
          xlink:to="FN_509442"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#Fact_132011347"
          xlink:label="Fact_132011347"
          xlink:type="locator"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="Fact_132011347"
          xlink:to="FN_509442"
          xlink:type="arc"/>
    </link:footnoteLink>
</xbrl>
