<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>5</documentType>

    <periodOfReport>2023-09-30</periodOfReport>

    <form3HoldingsReported>0</form3HoldingsReported>

    <form4TransactionsReported>0</form4TransactionsReported>

    <issuer>
        <issuerCik>0001069533</issuerCik>
        <issuerName>RGC RESOURCES INC</issuerName>
        <issuerTradingSymbol>RGCO</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001238821</rptOwnerCik>
            <rptOwnerName>GOODLATTE MARYELLEN F</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>P. O. BOX 13007</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>ROANOKE</rptOwnerCity>
            <rptOwnerState>VA</rptOwnerState>
            <rptOwnerZipCode>24030</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2022-11-01</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>277.141</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>21.1291</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30306.61</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2023-02-01</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F2"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>251.917</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>23.76</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30558.527</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2023-05-01</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F3"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>314.5030</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>19.19</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30873.03</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2023-08-01</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F4"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>305.482</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>19.96</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>31178.512</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Includes 185.901 shares purchased 11/01/2022 through dividends reinvested in the Restricted Stock Plan for Outside Directors of RGC Resources, Inc. and 91.240 shares purchased 11/01/2022 through dividends reinvested in the RGC Resources, Inc. Dividend Reinvestment and Stock Purchase Plan.</footnote>
        <footnote id="F2">Includes 168.981 shares purchased 02/01/2023 through dividends reinvested in the Restricted Stock Plan for Outside Directors of RGC Resources, Inc. and 82.936 shares purchased 02/01/2023 through dividends reinvested in the RGC Resources, Inc. Dividend Reinvestment and Stock Purchase Plan.</footnote>
        <footnote id="F3">Includes 210.963 shares purchased 05/01/2023 through dividends reinvested in the Restricted Stock Plan for Outside Directors of RGC Resources, Inc. and 103.540 shares purchased 05/01/2023 through dividends reinvested in the RGC Resources, Inc. Dividend Reinvestment and Stock Purchase Plan.</footnote>
        <footnote id="F4">Includes 204.912 shares purchased 08/01/2023 through dividends reinvested in the Restricted Stock Plan for Outside Directors of RGC Resources, Inc. and 100.570 shares purchased 08/01/2023 through dividends reinvested in the RGC Resources, Inc. Dividend Reinvestment and Stock Purchase Plan.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Maryellen F. Goodlatte by Paul W. Nester, POA dated 04/24/2023</signatureName>
        <signatureDate>2023-11-02</signatureDate>
    </ownerSignature>
</ownershipDocument>
