Chris McElligott Park
Home | Games | Blog | Tools | Bio

About

You can use this for water with different solutions in them, for population studies, for determining how to mix chicken feed, or various other things. This is about ratios, so it works with any unit of measurement. Here's how to calculate it by hand, if you prefer. Having trouble remembering how to calculate the whole from the part? Here's how to do that.


Using "Pearson's Square" To Calculate Total Needed:

I have two containers each with a mix that includes some in them. I measure these containers in . The first container has % protein. The second container has % protein.

I will mix some of each of them into a third container that I want to consist of % protein, and be a total of kg.

That being my goal, I will to find out that I need to add ??? kg from my first container, and ??? kg from my second container.



Using "Pearson's Square" To Calculate How Much To Add To Achieve A Target Percentage:

I have one container with a mix that includes some , and I measure the container in . This container has % protein in it, but I need to change it to be % protein instead.

My existing container is kg. I have a second mix that I want to add in to achieve my desired percentage of 18%, and it has % protein in it.

To get my desired percentage of 18%, I will to find out that I need to add ??? kg from my second mix, which will lead to a total weight of ??? kg.


Why does this exist?

My wife and I started raising chickens, and we had a feed with too much protein in it. There's wasn't any online handy calculator for just plugging in your numbers of how to get to the correct amount of feed to mix in at a different protein percentage.

Our book on chickens had a reference to Pearson's Square, which I'd never heard of at all. The approach was interesting for sure, and is a handy way to calculate it by hand. My wife was familiar with it from some papers she had written relating to population studies (one of her master's degrees is in public health).

Being the geek that I am, and needing a break from the usual math I'm flogging around -- trig and algebra, mostly -- I thought I'd take a break and make something that others could also use. I'm also rusty on javascript, so that was a nice quick refresher. At any rate, now this exists, and anyone is free to use it online or download it and use it. You can also get the code here.

Protip on the code: if you think that amount1 and amount2 are labeled backwards, then you need to read the pdf of Pearson's Square again. They go across the diagonal, hence the seeming inversion. This really took me a while to wrap my mind around, particularly the second case, but I'd say that was time well spent.

Hopefully for some actual farmers, or other backyard chicken enthusiasts, this will come up in search results and be handy. These two formats are opposites of one another, so you can check your work (or my work, as the case may be) and verify that the math works both directions. Looks good so far.

If you want to use this code anywhere else, attribution would be nice but is not required. Consider this to be released under as permissive a license as you can imagine.
Website Design and Content Copyright 2007-2020 Chris McElligott Park. Photography Copyright 2020 Merritt Chesson.