This question is worth an entire course by itself!
It's extremely difficult to tie the cost of a cup of coffee at the cafe all the way back to what the farmer is getting paid. It's a little bit easier to talk about the cost of a bag of coffee from a roaster and how that relates.
The bottom line - the farmer is not getting much. Caravella Coffee is an importer working in Central and South America and, I think, one of the best at providing transparent pricing information. In their impact report, you can see on page 18 and 19, that they paid an average of $2.12 per pound of coffee to the farmers (that's an average across all grades of coffee - from high quality AAA to what they call "ready to blend"). This is what's referred to as "farm gate" pricing - the price paid at the gate to the farmer.
If you take those numbers, you could calculate them out - assume a pound of green coffee is going to make about 20 - 12 oz cups of coffee once it's roasted and brewed and all of that. Then add back in the hundreds of people, and dozens of steps that coffee goes through to get all the way from the farm to your cup. It's kinda crazy.