According to the internet, the optimal carbon/nitrogen ratio for hot composting is somewhere between 25:1 and 30:1.
I have two resources; coffee and sawdust. Coffee has a C/N of 20:1 - a bit low on the carbon - and sawdust has a 325:1 ratio.
How would I calculate the ratio of sawdust to coffee to get a "perfect" 27:1 C/N ratio?
Let $c$ be the amount of nitrogen in coffee, and let $s$ be the amount of nitrogen in sawdust. That means there is $20c$ carbon in coffee, and $325s$ carbon in sawdust.
Note that when we mix coffee and sawdust, we have $c+s$ nitrogen, and $20c+325s$ carbon. We want the carbon-to-nitrogen ratio to be $27:1$, which means the carbon content must be $27(c+s)$.
We have to therefore set $20c+325s$ and $27c+27s$ as equal.
$$20c+325s = 27c+27s$$
$$298s = 7c$$
$$\fbox{s/c = 7/298}$$