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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:33:43+00:00 2026-06-18T03:33:43+00:00

This following code for get back to vat value from percentage value and amount

  • 0

This following code for get back to vat value from percentage value and amount value using java script but its not accuracy.

var vat=((25*100)/447);
vat=vat.toFixed(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-18T03:33:44+00:00Added an answer on June 18, 2026 at 3:33 am

    OK, to help, you need to specify the details you are working with. What is the VAT rate? Are you working from the gross value (includes the VAT), or the nett value (excludes the VAT).

    var nVatRate = 0.2;// This is the rate of VAT in the UK at present, 20%
    
    function VatAmountFromGross(nGrossAmount){
        return nGrossAmount / (1 + (1 / nVatRate));
    }
    
    function VatAmountFromNet(nNetAmount){
        return nNetAmount * (1 + nVatRate);
    }
    

    So, change the VAT rate to match yours, which I am guessing is 25% (0.25).

    Using “toFixed(1)” will ensure the value is fixed to 1 decimal place – usually you need two decimal places for VAT. You will also have rounding issues if you are summing values, and these cannot be helped.

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

Sidebar

Related Questions

I am using following code to get bitmap from url. This function is used
I am using the code as described in this question. However get following error
I've got the following code to get some Javascript back from the server: $.ajax({
Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
i have the following code : <input type=text value=<?php echo $_GET['msg']; ?>> This input
I have progress.js file which has the following code $('#text_area_input').keyup(function() { var text_area_box =$(this).val();//Get
my problem is the following: This is a part of my HTML-Code: <form method='GET'
To use custom layout file in my app I'm using this following code, set
I have tried the following code using the 2.0 framework and I get an
Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something

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.