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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:42:14+00:00 2026-06-14T19:42:14+00:00

How can I multiply two decimals and round the result down to 2 decimal

  • 0

How can I multiply two decimals and round the result down to 2 decimal places?

For example if the equation is 41.75 x 0.1 the result will be 4.175. If I do this in c# with decimals it will automatically round up to 4.18. I would like to round down to 4.17.

I tried using Math.Floor but it just rounds down to 4.00. Here is an example:

Math.Floor (41.75 * 0.1);
  • 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-14T19:42:15+00:00Added an answer on June 14, 2026 at 7:42 pm

    The Math.Round(...) function has an Enum to tell it what rounding strategy to use. Unfortunately the two defined won’t exactly fit your situation.

    The two Midpoint Rounding modes are:

    1. AwayFromZero – When a number is halfway between two others, it is rounded toward the nearest number that is away from zero. (Aka, round up)
    2. ToEven – When a number is halfway between two others, it is rounded toward the nearest even number. (Will Favor .16 over .17, and .18 over .17)

    What you want to use is Floor with some multiplication.

    var output = Math.Floor((41.75 * 0.1) * 100) / 100;
    

    The output variable should have 4.17 in it now.

    In fact you can also write a function to take a variable length as well:

    public decimal RoundDown(decimal i, double decimalPlaces)
    {
       var power = Convert.ToDecimal(Math.Pow(10, decimalPlaces));
       return Math.Floor(i * power) / power;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a question extending the code in this question : Can you multiply two
I have to multiply two decimal numbers: 6,0 * 5,50 which results in: 33,000
I was wondering how can matlab multiply two matrices so fast. When multiplying two
When I multiply two unsigned chars in C like this: unsigned char a =
How can you multiply two unsigned 23-bit numbers if you only have memory locations
Possible Duplicate: Matrix Multiplication in python? I already wrote a program can multiply two
I ran into problem in TCL. I can add and multiply two integer variables.
I'm trying to multiply two matrices stored inside 1d arrays. I'm using this function,
I have two tables user and email. One user can have multiple emails so
In digital imaging, when overlaying two visual layers there are multiple ways you can

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.