PolicyEngine logo
menu
Research
About
Donate
Learn ▼

How much should James Medlock donate to GiveDirectly?

We built a mini-app with the policyengine-us Python package to crunch the implications of a Twitter bet.

By max ghenis and nikhil woodruff

March 23, 2023

4 min read

How much should James Medlock donate to GiveDirectly?

Contents

Who is James Medlock?

Using our calculator

Conclusion

Jump to the tool

One week ago, Twitter user James Medlock tweeted:

The next day, entrepreneur and investor Balaji Srinivasan agreed by quote-tweet:

That is, Srinivasan, the former CTO of Coinbase, is betting that Bitcoin will exceed $1 million US dollars within 90 days.

This bet appears to be moving forward. When discussing how he’d use the potential winnings, Medlock tweeted:

GiveDirectly is a charity that gives unconditional cash transfers to low-income households. Medlock plans to give an unrestricted grant, which GiveDirectly currently directs to Africa.

Should Medlock win his bet, how much should he donate to GiveDirectly to fulfill his pledge? The interaction between charitable donations and tax liability means that answering this question requires a model of the tax code — like PolicyEngine’s.

Using our policyengine-us Python package — the same package that powers our web app — and the Streamlit dashboarding software, we built a tool to calculate how much Medlock should give. The amount to give also depends on other circumstances of Medlock’s finances and household, and our tool includes levers to explore different scenarios.

We find that Medlock should give between $333,000 (if he has at least $4 million in other income) and $565,000 (if he has no other income).

Who is James Medlock?#

James Medlock (@jdcmedlock) is a pseudonymous Twitter account known for his social and economic policy content. Relevant information for his taxes include:

Using our calculator#

Our calculator runs Medlock’s household through the policyengine-us Python package via the Streamlit dashboarding app. We consider the above characteristics, and then let users set employment and self-employment income for Medlock and his wife.

As an example, suppose Medlock earns $100,000 from self-employment, and his wife earns $100,000 from employment. We would enter this as so:

The main PolicyEngine app shows that, between payroll tax, self-employment tax, federal income tax, and California income tax, they would pay $58,949 in taxes, leaving a net income of $141,051 (they would not be eligible for any benefits).1

Now with $1 million in gambling winnings, their tax bill will rise $436,115 from $58,949 to $495,064; federal income taxes rise from $26,967 to $361,051, California income taxes rise from $10,202 to $112,233, and payroll and self-employment taxes stay the same. Their net income rises by the remaining $563,886 to $704,937 if he doesn’t donate anything.

To take home $300,000, they might consider donating $700,000. But if they did so, their taxes would rise $119,088, leaving them with only $300,000 — $119,088 = $180,912 net. How much less than $700,000 of a donation will offset the tax change?

Our app shows that, for Medlock’s net income to rise by $300,000, he should donate $484,848. In this scenario, his taxes would rise $215,235. (This actually leaves him $299,917; we run an optimization process that gets within $100 or so to save time.)

We also show various donation scenarios as a table:

And as a Plotly chart:

Calling the policyengine-us Simulation object with axes makes it easy and fast to simulate many scenarios like this. All in all, the app required 224 lines of Python code, including text and charts. See the full program at github.com/PolicyEngine/james-medlock-donation-solver and the app at policyengine-james-medlock-donation-solver.streamlit.app.

Conclusion#

While most of our users interact with our software through the web app, our Python packages provide flexible analysis, especially paired with dashboarding tools like Streamlit. We’ll be watching the Medlock-Srinivasan bet, and building more tools to answer one-off questions outside our main app, including those around charitable giving. Stay tuned!

  1. California has not yet released its 2023 tax bracket thresholds, so we use values from 2022.

PolicyEngine logo

Subscribe to PolicyEngine

Get the latests posts delivered right to your inbox.


© 2025 PolicyEngine. All rights reserved.