Calculating effective percentage

53 Views Asked by At

I'm a middleman buying products on behalf of my clients. The client pays me x and I buy the product from seller for 25% of what the client pays me (for simplicity, I keep the remaining 75% of x). Sometimes, for reasons unrelated to my question, I need to buy from the seller at 60% (such that my profits are now 40% for this one purchase).

I'm trying to generalize a formula that tells me my effective margin. That is, if x% of the time I buy for m% of what I got from the client, and y% of the time I buy for n%, how do I compute what percentage of my income (what I got from the client) I spent (bought from sellers)?

Edit

To simplify, let's make the assumption that I always get paid the same amount by all clients (say, $100 always).

Example

Four transactions:

1. Received => $100; Bought => $25 (25%)
2. Received => $100; Bought => $25 (25%)
3. Received => $100; Bought => $25 (25%)
4. Received => $100; Bought => $45 (45%)

So 75% of the time, I bought at 25%. 25% of the time, I bought at 45%. My "effective percentage" was 0.3 ((25*3+45)/400).

Is there a generalized way to get my effective percentage (and is there a more precise term to describe what I'm trying to compute)?