Flustig Mar 14, 2015 @ 1:15pm
calculating steam market price without fee from price with fee included
i tried to make a script to calculate fee-less price from fee included price on steam market multiple times, but its always slightly different from when I test the steam's calculation in the inventory

how does the steam calculate it?

Something went wrong while displaying this content. Refresh

Error Reference: Community_9721151_
Loading CSS chunk 7561 failed.
(error: https://community.fastly.steamstatic.com/public/css/applications/community/communityawardsapp.css?contenthash=789dd1fbdb6c6b5c773d)
< 1 2 >
Showing 1-15 of 16 comments
TirithRR Mar 14, 2015 @ 1:18pm 
About 15%, rounded.

10% for Developer/Publisher of game the item is for and 5% for Valve.

Minimum of 0.01 for each fee. So selling something for 0.01 gives you 0.01 fee for Publisher and 0.01 fee for Valve, so the buyer pays 0.03 total.

Sell something for 0.20, you get a 0.02 fee for Publisher and a 0.01 fee for Valve, for 0.23 total.

You will run into times when the rounding gives you the same result, so for example, around 0.20 and 0.21, you may see the "amount you get" always be 0.20, when you press accept. Or it rounds up to 0.24, etc. There are a few around the change over points that the results don't round smoothly and it's always taken out of the amount you recieve.
Last edited by TirithRR; Mar 14, 2015 @ 1:20pm
Flustig Mar 14, 2015 @ 1:22pm 
Originally posted by TirithRR:
About 15%, rounded.

10% for Developer/Publisher of game the item is for and 5% for Valve.

Minimum of 0.01 for each fee. So selling something for 0.01 gives you 0.01 fee for Publisher and 0.01 fee for Valve, so the buyer pays 0.03 total.

Sell something for 0.20, you get a 0.02 fee for Publisher and a 0.01 fee for Valve, for 0.23 total.

You will run into times when the rounding gives you the same result, so for example, around 0.20 and 0.21, you may see the "amount you get" always be 0.20, when you press accept.
the problem is calculating from the price you pay to price that seller receives
Hanomaly Mar 14, 2015 @ 1:26pm 
Originally posted by Flustig:
the problem is calculating from the price you pay to price that seller receives
i'm not great a math.. but.. wouldn't that just be.. Basically what Tirith said backwards?

Price you pay... subtracting 15% from the price you paid.. equals how much the seller receives.

So in this case.. you pay $1.00 for something.. $1.00 subtracting 15% of $1 equals .15 cents. $1 minus .15 equals .75 cents that the seller received.

Wouldn't it work that way...?
TirithRR Mar 14, 2015 @ 1:26pm 
Originally posted by Flustig:
the problem is calculating from the price you pay to price that seller receives

That's simple mathematics. A little bit of junior high Algebra

X = What Seller receives
Y = What Buyer pays

X + X*(0.10) + X*(0.05) = Y
(1.15) * X = Y
X = Y / (1.15)

Of course you need some fudge factors in there to compensate for the fact that X*(0.10) and X*(0.05) values are rounded to a whole number, usually up, and the cannot be less than 0.01 .

Edit:
You can't just take 15% of the buyer's price, because the 15% is from the seller's price, which is slightly lower. So you have to divide the Buyers price by 1.15 to get the Seller's price. And of course the rounded and minimum values make the equation not work for very small prices.
Last edited by TirithRR; Mar 14, 2015 @ 1:32pm
Hanomaly Mar 14, 2015 @ 1:27pm 
Originally posted by TirithRR:
Originally posted by Flustig:
rice that seller receives

That's simple mathematics. A little bit of junior high Algebra

X = What Seller receives
Y = What Buyer pays

X + X*(0.10) + X*(0.05) = Y
(1.15) * X = Y
X = Y / (1.15)

Of course you need some fudge factors in there to compensate for the fact that X*(0.10) and X*(0.05) values are rounded to a whole number, usually up, and the cannot be less than 0.01 .
math is hard >.<
TirithRR Mar 14, 2015 @ 1:31pm 
If you want to calculate correctly, you can create an Excel file and use it as a database.

Column A = Seller's Price
Column B = Publisher Fee (10% rounded, 0.01 minimum)
Column C = Valve Fee (5% rounded, 0.01 minimum)
Column D = Buyer's Price (Total of A, B, and C)

You'll see that at lower prices, the value of the fee is more than 15%, due to the minimum fee of each and rounding. Once you get to higher prices, the fee will begin to reflect the proper amount.
Flustig Mar 14, 2015 @ 1:33pm 
Originally posted by TirithRR:
values are rounded to a whole number, usually up, and the cannot be less than 0.01
thats part of the problem that the rounding is wierd
Last edited by Flustig; Mar 14, 2015 @ 1:34pm
TirithRR Mar 14, 2015 @ 1:45pm 
Testing it out a bit in OpenOffice (Excel):

So far I have:

SellerPrice

PublisherFee = Rounddown(SellerPrice*0.10;2)
Rounds down to two digits past the decimal

ValveFee = Rounddown(SellerPrice*0.05;2)
Rounds down to two digits past the decimal

ActualPublisherFee = If(PublisherFee<0.01; 0.01; PublisherFee)
This puts 0.01 into the fee if the calculated fee was less than 0.01

ActualValveFee = If(ValveFee<0.01; 0.01; ValveFee)
This puts 0.01 into the fee if the calculated fee was less than 0.01

BuyerPrice = SellerPrice + ActualPublisherFee + ActualValveFee

Once you create the database, do a Buyer/Seller price lookup.

Edit:
The rounding may not be 100% accurate, it's only a first draft and hasn't been tested or compared about real values.
Last edited by TirithRR; Mar 14, 2015 @ 1:47pm
Flustig Mar 14, 2015 @ 1:56pm 
Originally posted by TirithRR:
Testing it out a bit in OpenOffice (Excel):

So far I have:

SellerPrice

PublisherFee = Rounddown(SellerPrice*0.10;2)
Rounds down to two digits past the decimal

ValveFee = Rounddown(SellerPrice*0.05;2)
Rounds down to two digits past the decimal

ActualPublisherFee = If(PublisherFee<0.01; 0.01; PublisherFee)
This puts 0.01 into the fee if the calculated fee was less than 0.01

ActualValveFee = If(ValveFee<0.01; 0.01; ValveFee)
This puts 0.01 into the fee if the calculated fee was less than 0.01

BuyerPrice = SellerPrice + ActualPublisherFee + ActualValveFee

Once you create the database, do a Buyer/Seller price lookup.

Edit:
The rounding may not be 100% accurate, it's only a first draft and hasn't been tested or compared about real values.
mine doesnt have duplicate price where they should be, even when rounding up or down
TirithRR Mar 14, 2015 @ 1:58pm 
Originally posted by Flustig:
mine doesnt have duplicate price where they should be, even when rounding up or down

A duplicate buyer or seller price?

There shouldn't be duplicate buyer prices. And the duplicate seller prices are deleted/skipped by Valve, always going down to the lower seller price, keeping the buyer price the same, when you press accept and attempt to sell it.

As I said though, it's rough, written in a few minutes. There may be errors, things that need to be tweaked.
Last edited by TirithRR; Mar 14, 2015 @ 1:59pm
Flustig Mar 14, 2015 @ 2:04pm 
Originally posted by TirithRR:
Originally posted by Flustig:
mine doesnt have duplicate price where they should be, even when rounding up or down

A duplicate buyer or seller price?

There shouldn't be duplicate buyer prices. And the duplicate seller prices are deleted/skipped by Valve, always going down to the lower seller price, keeping the buyer price the same, when you press accept and attempt to sell it.

As I said though, it's rough, written in a few minutes. There may be errors, things that need to be tweaked.
0.21 and 0.22 both give 0.19, so the calculator should calculate both of these to 0.19, this will save 0.01 of the buyers price, because valve chooses the 0.21, but you as a seller will be unnafected by it selling for 0.19
Last edited by Flustig; Mar 14, 2015 @ 2:05pm
TirithRR Mar 14, 2015 @ 2:08pm 
Originally posted by Flustig:
Originally posted by TirithRR:

A duplicate buyer or seller price?

There shouldn't be duplicate buyer prices. And the duplicate seller prices are deleted/skipped by Valve, always going down to the lower seller price, keeping the buyer price the same, when you press accept and attempt to sell it.

As I said though, it's rough, written in a few minutes. There may be errors, things that need to be tweaked.
0.21 and 0.22 both give 0.19, so the calculator should calculate both of these to 0.19, this will save 0.01 of the buyers price, because valve chooses the 0.21, but you as a seller will be unnafected by it selling for 0.19

Do you have any items to list? Try putting in the Buyer pays 0.20, 0.21, and 0.22, and press accept. See what it gives you as the "You Receive" fields, you may see it update or change accordinglingly, skipping or rounding differently.


Edit:
If you put in 0.21, it shows 0.19 as the "You Receive"
If you put in 0.22, it shows 0.19 as the "You Recieve" and when you press "Accept" it switches the "Buyer Pays" to 0.21 automatically.

The equations I gave, it skips 0.22, just like Valve does.

So far, the equations I made seem accurate there.
Last edited by TirithRR; Mar 14, 2015 @ 2:11pm
Flustig Mar 14, 2015 @ 2:13pm 
Originally posted by TirithRR:
Originally posted by Flustig:
0.21 and 0.22 both give 0.19, so the calculator should calculate both of these to 0.19, this will save 0.01 of the buyers price, because valve chooses the 0.21, but you as a seller will be unnafected by it selling for 0.19

Do you have any items to list? Try putting in the Buyer pays 0.20, 0.21, and 0.22, and press accept. See what it gives you as the "You Receive" fields, you may see it update or change accordinglingly, skipping or rounding differently.
thats what i was checking it with, input in buyer pays 0.20 = 0.18 0.21 = 0.19 0.22 = 0.19 0.23 = 0.20
input in you receive 0.19 = 0.21
TirithRR Mar 14, 2015 @ 2:15pm 
If you put in 0.21, it shows 0.19 as the "You Receive"
If you put in 0.22, it shows 0.19 as the "You Recieve" and when you press "Accept" it switches the "Buyer Pays" to 0.21 automatically.

The equations I gave, it skips 0.22, just like Valve does.

The same for 0.32 and 0.33
The same for 0.43, 0.44, 0.45

Valve skips those values, lowering it to the lowest point.

My equations also skip those values completely. Leaving blanks in the "Buyer Pays" list. So far my equations are accurate.

Edit:
I tested it out on 1.24 and 1.25 as well, both work the same as Valve does. And the same in my equations.

I'm pretty confident that my database and equations are accurate. Now you just have to do a reverse lookup, look up the buyer price, find the seller price that corresponds to it, and display the result. If you don't see the buyer price, then it's not a valid price and needs to be lowered to the correct price and displayed to the user that you cannot sell for that price.
Last edited by TirithRR; Mar 14, 2015 @ 2:18pm
Flustig Mar 14, 2015 @ 2:20pm 
Originally posted by TirithRR:
If you put in 0.21, it shows 0.19 as the "You Receive"
If you put in 0.22, it shows 0.19 as the "You Recieve" and when you press "Accept" it switches the "Buyer Pays" to 0.21 automatically.

The equations I gave, it skips 0.22, just like Valve does.

The same for 0.32 and 0.33
The same for 0.43, 0.44, 0.45

Valve skips those values, lowering it to the lowest point.

My equations also skip those values completely. Leaving blanks in the "Buyer Pays" list. So far my equations are accurate.
the point is to calculate you receive from buyer pays, when you dont know the you receive
< 1 2 >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Mar 14, 2015 @ 1:15pm
Posts: 16