<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2024"
  xmlns:ecd="http://xbrl.sec.gov/ecd/2024"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="xgn-20241231.xsd" xlink:type="simple"/>
    <context id="P01_01_2024To12_31_2024">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001274737</identifier>
        </entity>
        <period>
            <startDate>2024-01-01</startDate>
            <endDate>2024-12-31</endDate>
        </period>
    </context>
    <dei:DocumentType contextRef="P01_01_2024To12_31_2024" id="hidden140208760">DEF 14A</dei:DocumentType>
    <dei:AmendmentFlag contextRef="P01_01_2024To12_31_2024" id="ixv-4734">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="P01_01_2024To12_31_2024" id="ixv-4735">0001274737</dei:EntityCentralIndexKey>
    <dei:EntityRegistrantName contextRef="P01_01_2024To12_31_2024" id="ixv-4745">Exagen Inc.</dei:EntityRegistrantName>
    <ecd:InsiderTrdPoliciesProcAdoptedFlag contextRef="P01_01_2024To12_31_2024" id="ixv-4749">true</ecd:InsiderTrdPoliciesProcAdoptedFlag>
    <ecd:AwardTmgMnpiDiscTextBlock contextRef="P01_01_2024To12_31_2024" id="ixv-1493">&lt;div style="margin-top: 18pt; margin-bottom: 0pt; font-size: 10pt; font-family: ARIAL;"&gt;&lt;div style="font-weight:bold;display:inline;"&gt;Policies and Practices Related to the Grant of Certain Equity Awards &lt;/div&gt;&lt;/div&gt;&lt;div style="line-height:3.0pt;margin-top:0pt;margin-bottom:2pt;border-bottom:1px solid #000000"&gt;&#160;&lt;/div&gt;&lt;div style="margin-top:6pt; margin-bottom:0pt; font-size:10pt; font-family:ARIAL"&gt;Our equity awards, including stock options, are granted in connection with our yearly compensation cycle and regularly scheduled meetings of the compensation committee. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:ARIAL"&gt;Typically, our practice is to make annual award grants at regularly scheduled meetings. Our policy is to not grant stock options or similar awards in anticipation of the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&#160;information&lt;/div&gt; and to not time the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&#160;information&lt;/div&gt; based on an equity award grant date, but some option grants may be granted close in time to the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&lt;/div&gt; information to the extent those options are being granted upon hiring of new executive officers or in connection with annual grants being made as part of our director compensation policy. &lt;/div&gt;&lt;div style="margin-top:12pt; margin-bottom:0pt; font-size:10pt; font-family:ARIAL"&gt;During the year ended December&#160;31, 2024, we did&#160;not time&#160;the disclosure of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&lt;/div&gt; information for the purpose of affecting the value of executive compensation, and none of our NEOs were awarded options with an effective grant date during any period beginning four business days before the filing or furnishing of a &lt;div style="white-space:nowrap;display:inline;"&gt;Form&#160;10-Q,&lt;/div&gt; &lt;div style="white-space:nowrap;display:inline;"&gt;Form&#160;10-K,&#160;or&lt;/div&gt; &lt;div style="white-space:nowrap;display:inline;"&gt;Form&#160;8-K&#160;that&lt;/div&gt; disclosed &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&#160;information,&lt;/div&gt; and ending one business day after the filing or furnishing of such reports. &lt;/div&gt;&lt;div style="margin-top:0pt;margin-bottom:0pt ; font-size:8pt"&gt;&#160;&lt;/div&gt;</ecd:AwardTmgMnpiDiscTextBlock>
    <ecd:AwardTmgMnpiCnsdrdFlag contextRef="P01_01_2024To12_31_2024" id="ixv-1499">false</ecd:AwardTmgMnpiCnsdrdFlag>
    <ecd:AwardTmgHowMnpiCnsdrdTextBlock contextRef="P01_01_2024To12_31_2024" id="ixv-1500">Our policy is to not grant stock options or similar awards in anticipation of the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&#160;information&lt;/div&gt; and to not time the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&#160;information&lt;/div&gt; based on an equity award grant date, but some option grants may be granted close in time to the release of &lt;div style="white-space:nowrap;display:inline;"&gt;material&#160;non-public&lt;/div&gt; information to the extent those options are being granted upon hiring of new executive officers or in connection with annual grants being made as part of our director compensation policy.</ecd:AwardTmgHowMnpiCnsdrdTextBlock>
    <ecd:MnpiDiscTimedForCompValFlag contextRef="P01_01_2024To12_31_2024" id="ixv-4750">false</ecd:MnpiDiscTimedForCompValFlag>
</xbrl>
