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 7777869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:15:09+00:00 2026-06-01T18:15:09+00:00

I have an amount $9558.99 , which I need to split between 4 people:

  • 0

I have an amount $9558.99, which I need to split between 4 people: 40%, 40%, 10%, 10% . (This is just an example where the problem surfaces)

When I calculate the fraction I get the following results, which all contain fractions of a penny, which is no good, because obviously I can’t give a person half a penny.

40%  $3823.5960
40%  $3823.5960
10%  $955.8990
10%  $955.8990
SUM  $9558.99

If I round up I get a penny over:

40%  $3823.60
40%  $3823.60
10%  $955.90
10%  $955.90
SUM  $9559.00 <-- 1 penny over

If I round down I get 3 penny less (again no suprise):

40%  $3823.59
40%  $3823.59
10%  $955.89
10%  $955.89
SUM  $9558.96 <-- 3 pennies under

So my question is what would be the correct approach to fairly divide the amount based on the percentages?

EDIT: This might not be a programming question per-se but I think it’s related to a programmer anyway.

  • 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-01T18:15:10+00:00Added an answer on June 1, 2026 at 6:15 pm

    Round up, and subtract the excessive penny(s) randomly.

    To subtract randomly, pick n random people where n = number of leftover penny(s).

    Intuitively speaking I believe that n will not be greater than 3 in this scenario.

    (Alternatively, round down and spread remaining pennies randomly).

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

Sidebar

Related Questions

I have an amount field which is a decimal in the database. I need
I'm using RangeQuery to get all the documents which have amount between say 0
I have huge amount of txt files which contains 64x64 matrices consisting of integers.
I have a large amount of data I need to store, and be able
I have some (small amount) of data that I'll need quick access to on
I have amount attribute in coredata model with string datatype. I need to find
Basically I have x amount of matrices I need to establish of y by
I don't know whether this question makes sense or not. I have huge amount
I have a problem in a Java Code Lab that reads as this: Give
I have a large amount of audio stored on my web server in a

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.