Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9205413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:56:41+00:00 2026-06-17T23:56:41+00:00

I have a source value that I need to apply multiple percentages, but at

  • 0

I have a source value that I need to apply multiple percentages, but at the same time, and the percentages have to take into account the other percentages.

Take for instance:
Value = 100
Percentage1 = 10%
Percentage2 = 15%
Percentage3 = 17%

I need to work out what the final value would be, but when adding Percentage1 it has to take into account the values from Percentage2 and Percentage3.

The only way I have managed this at the moment is to recursively calculate the value with the last values of the other percentages until there are no more changes, but I’m not even sure if that is right.

Is there a smarter way of calculating this?

EDIT: This is basically to calculate multiple fees.
So say you put up a listing on eBay and you get charged 10% for listing on eBay, and the buyer has bought through paypal, and you get charged 15% for a paypal transaction, and then you get charged a further 17% due to shipping, we are trying to work out what the final fees will be and then scale the value accordingly.

This is the code that I’m using:

    Dim Value As Decimal = 100
    Dim Fee1Percent As Decimal = 0.1
    Dim Fee2Percent As Decimal = 0.15
    Dim Fee3Percent As Decimal = 0.17

    Dim PreviousFee1 As Decimal
    Dim PreviousFee2 As Decimal
    Dim PreviousFee3 As Decimal

    Dim Fee1 As Decimal
    Dim Fee2 As Decimal
    Dim Fee3 As Decimal

    Do
        PreviousFee1 = Fee1
        PreviousFee2 = Fee2
        PreviousFee3 = Fee3

        Fee1 = Math.Round((Value + PreviousFee2 + PreviousFee3) * Fee1Percent, 4, MidpointRounding.AwayFromZero)
        Fee2 = Math.Round((Value + PreviousFee1 + PreviousFee3) * Fee2Percent, 4, MidpointRounding.AwayFromZero)
        Fee3 = Math.Round((Value + PreviousFee1 + PreviousFee2) * Fee3Percent, 4, MidpointRounding.AwayFromZero)

    Loop Until PreviousFee1 = Fee1 AndAlso PreviousFee2 = Fee2 AndAlso PreviousFee3 = Fee3

This is my recursive list, so you start with the initial value of 100, and then use the previous values of the other fees until there are no more changes (rounded to 4 decimal places)

10.0        15.00       17.00
13.200      19.0500     21.2500
14.0300     20.1675     22.4825
14.2650     20.4769     22.8136
14.3291     20.5618     22.9061
14.3468     20.5853     22.9315
14.3517     20.5917     22.9385
14.3530     20.5935     22.9404
14.3534     20.5940     22.9409
14.3535     20.5941     22.9411
14.3535     20.5942     22.9411
14.3535     20.5942     22.9411

So in this case my final sum is 157.8888

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:56:42+00:00Added an answer on June 17, 2026 at 11:56 pm

    The issue was a wrong approach to my calculations: I had to mark up the base price using a reverse calc of the percentages

    So using the 10%, 15% and 17%, here is the math: 100 / (1 – 0.1 – 0.15 – 0.17) = 172.414

    And the proof:
    10% – 17.2414
    15% – 25.8621
    17% – 29.3103
    With a final total of 72.414, leaving, exactly 100.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have source XMLfiles that come in with multiple root elements and there is
I have 2 tables Source and Destination that have the same fields. ID and
I have this code that aggregates multiple workbooks into a preview file where all
I have a text that is a source-code file, I need to find the
I have a source flat file with values such as 24.209991, but they need
i have something that requires a matrix of values, similar to pokemon: (source: firechao.com
I'm working in xmldataprovider and we have configuration value source this value may be
I have a checkbox who's checked value is bound to a binding source which
I have two custom value transformers contained within my Other Sources folder, bound to
Have a source xml document that uses namespace containing prefixes and a default namespace.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.