There's a PDF
here that has the full formula that you can look at to work through the numbers yourself.
In a nutshell, the way the formula works is that you first scale up all of your earnings in previous years for inflation. Then you take the top 35 years (including zero-earning years, if applicable) and add them up. Then they have you divide that into a monthly amount, your monthly average earnings for your top 35 years. There's a formula to convert this number into a monthly benefit.
The key thing here is that there are two "bend points" where once you get there, earning more money is less beneficial than before. They're kind of like tax brackets. The first one is at $885 of monthly earnings. Social security will replace 90% of your average income between $0 and $885 if you start collecting benefits at your "full retirement age". The next one is at $5,336, replacing 32% of your income between $885 and $5,336. Past $5,336, you only get 15% back per month.
That $885 number equates to $371,700 in lifetime inflation-adjusted earnings. Once you get there, retiring early has much less of an effect on your benefits. To get twice as much per month, you would need to earn an additional $1.05 million.
The key thing is to get your ten years' worth of credits so that you get some benefit. Past that, working more just doesn't matter as much as you might expect.