Formula for spreading a number through out days in month and 24 hours a day with relation to another number

29 Views Asked by At

In my calculation, I have 2 numbers X = 375 and Y = 1000 (even though they are given, they can be different for each calculation). X needs to be spread throughout a month and 24 hours a day but the number needs to have a relation with Y.

What I need is a number that can be spread out throughout a month and all hours in a day but the sum of that number would be X and there is a relation between Y.

What I have so far is:

R = X / Y

D = X / (31 * 24)

P = D * R

and in numbers it would be:

R = 375 / 1000 = 0.375

D = 375/ (31 * 24) = 0.50

P = 0.50 * 0.375 = 0.187

0.187 * 30 * 24 = 134.64

But when I spread out P though out 31 days and 24 hours a day, the sum is not X.

This formula is going to be used for my electricity classes and I can explain the use.

Y is monthly consumption and X is the monthly fixed payment. So I need to have a number that can be set to each hour as an HourlyRate. So if someone has 2000 in consumption but the fixed amount is 375, he would be having less in HourlyRate but the sum would always be X.

I've been playing around with so many formulas but I'm stuck and appreciate any help!

Thanks in advance!