The easy part was clear to me after using Steemit for a while and reading some articles about author rewards. The more difficult part is the curation rewards calculation. I came to my solution by connecting what I already knew, trying out different things and watching the resulting values.
I don't show the gross amount as it is being shown on Steemit. I subtract the calculated curation and beneficiary amounts from the author payout sum, so that we can see how much we really will receive. It's not perfect yet, but it's already coming very near to the real payout amounts.