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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-04-29</periodOfReport>

    <issuer>
        <issuerCik>0001591670</issuerCik>
        <issuerName>Farmland Partners Inc.</issuerName>
        <issuerTradingSymbol>FPI</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001513547</rptOwnerCik>
            <rptOwnerName>Grafton Jennifer S</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O FARMLAND PARTNERS INC.</rptOwnerStreet1>
            <rptOwnerStreet2>4600 S. SYRACUSE STREET SUITE 1450</rptOwnerStreet2>
            <rptOwnerCity>DENVER</rptOwnerCity>
            <rptOwnerState>CO</rptOwnerState>
            <rptOwnerZipCode>80237</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-04-29</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>4000</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>10.79</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>8000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Represents a grant of restricted shares of common stock pursuant to the Third Amended and Restated Farmland Partners Inc. 2014 Equity Incentive Plan, which shares will vest on the first anniversary of the date of the grant.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Justin R. Salon, as attorney-in-fact for Jennifer S. Grafton</signatureName>
        <signatureDate>2024-05-01</signatureDate>
    </ownerSignature>
</ownershipDocument>
