Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in this Registration Statement on Form S-8 of Medifast, Inc. of our reports dated February 18, 2025, relating to the consolidated financial statements and the effectiveness of internal control over financial reporting of Medifast, Inc., appearing in the Annual Report on Form 10-K of Medifast, Inc. for the year ended December 31, 2024.

/s/ RSM US LLP

Baltimore, Maryland
August 4, 2025