Is the profit sharing contribution limited by earned income for a self employed business owner? I contributed $24,500 as an employee and $7500 as an employer.

I work as a Notary, and so I am exempt from self-employment tax.  I would like to know if I overcontributed to my 401K.  I am over 50 and contributed $24,500 as an employee and $7500 as an employer.  I am uncertain if the employer matching contributions have to be 20 or 25 percent of the net earnings.  I have my own unincorporated business.  My net earnings are $26,624.  I called my custodian to see if I could withdraw some of the employer matching contributions, but apparently, it is difficult to do, and I could be charged a 10% penalty for the excess contribution.  I tried to work with the Keogh Sep Worksheet but found it difficult to estimate the adjustment amount. Thanks in advance for your help.