This is "By Design". The parseFloat function will only consider the parts of the string up until in reaches a non +, -, number, exponent or decimal point. Once it sees the comma it stops looking and only considers the "75" portion.

  • https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseFloat

To fix this convert the commas to decimal points.

var fullcost = parseFloat($("#fullcost").text().replace(',', '.'));
Answer from JaredPar on Stack Overflow
🌐
W3Schools
w3schools.com › jsref › jsref_parsefloat.asp
JavaScript parseFloat() Method
❮ Previous JavaScript Global ... was 40"); Try it Yourself » · More examples below. The parseFloat() method parses a value as a string and returns the first number....
Discussions

parsefloat - Javascript parse float is ignoring the decimals after my comma - Stack Overflow
parseFloat parses according to the JavaScript definition of a decimal literal, not your locale's definition. (E.g., parseFloat is not locale-aware.) Decimal literals in JavaScript use . More on stackoverflow.com
🌐 stackoverflow.com
Difference parseInt() and parseFloat()
Nadia . is having issues with: Hi! Can anyone explain me the difference between parseInt and parseFloat? Like in what kind of situation should you use each of them? More on teamtreehouse.com
🌐 teamtreehouse.com
3
June 8, 2016
Converting a string to a float in Javascript?
+"3.4" => 3.4 More on reddit.com
🌐 r/javascript
15
0
March 27, 2015
javascript - What is the difference between Number(...) and parseFloat(...) - Stack Overflow
5 Why parseFloat in javascript returns string type for me? More on stackoverflow.com
🌐 stackoverflow.com
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-parse-float-with-two-decimal-places-in-javascript
How to Parse Float with Two Decimal Places in JavaScript? - GeeksforGeeks
JavaScript provides an inbuilt parseFloat() method to parse a string and returns a floating-point number.
Published   July 23, 2025
🌐
Programiz
programiz.com › javascript › library › built-in › parseFloat
JavaScript parseFloat()
Become a certified JavaScript programmer. Try Programiz PRO! ... The parseFloat() function parses an argument and returns a floating-point number.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number › parseFloat
Number.parseFloat() - JavaScript | MDN
July 10, 2025 - The Number.parseFloat() static method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns NaN.
Find elsewhere
🌐
Scaler
scaler.com › home › topics › javascript parsefloat()
JavaScript parseFloat() Method - Scaler Topics
March 7, 2024 - Learn how to use the parseFloat() method in JavaScript to convert strings to floating-point numbers efficiently. Master concept of parsefloat in JavaScript.
🌐
Flexiple
flexiple.com › javascript › parsefloat-javascript
parseFloat JavaScript: Syntax and Examples - Flexiple
March 14, 2022 - Learn how to use the JavaScript parseFloat function to convert strings to floating-point numbers accurately. Examples and tips included.
🌐
Edgecompute
js-compute-reference-docs.edgecompute.app › parsefloat()
parseFloat() | @fastly/js-compute
The parseFloat function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or NaN.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-number-parsefloat-method
JavaScript Number parseFloat() Method - GeeksforGeeks
July 11, 2025 - JavaScript parseFloat() Method is used to accept the string and convert it into a floating-point number. If the string does not contain a numeral value or If the first character of the string is not a Number then it returns NaN i.e, not a number.
🌐
Medium
medium.com › @maxheadway › the-differences-between-number-and-parsefloat-in-javascript-8ee74b961ed4
The differences between Number() and parseFloat() in Javascript | by Max Headway | Medium
February 19, 2023 - The parseFloat Function The parseFloat function is used to convert a string to a floating-point number. It parses the string argument and returns a floating-point number.
🌐
Reddit
reddit.com › r/javascript › converting a string to a float in javascript?
r/javascript on Reddit: Converting a string to a float in Javascript?
March 27, 2015 -

I can't use parseFloat(). I am so far doing the obvious by checking each character, but I feel there has to be a more elegant way! My function needs to act exactly the same as parseFloat() does. Can anyone help?

🌐
Codecademy
codecademy.com › docs › javascript › number methods › .parsefloat()
JavaScript | Number Methods | .parseFloat() | Codecademy
May 31, 2024 - In JavaScript, the .parseFloat() method parses a given string and returns the first floating-point number found in the string. Parsing stops when it encounters a character that is not part of a valid number.
🌐
Vultr Docs
docs.vultr.com › javascript › global › parseFloat
JavaScript parseFloat() - Parse String to Float | Vultr Docs
November 6, 2024 - The parseFloat() function in JavaScript is a invaluable tool for transforming string data into float numbers, significantly aiding in calculations and data processing. It efficiently handles a variety of string formats including those with ...
Top answer
1 of 5
67

The internal workings are not that different, as @James Allardic already answered. There is a difference though. Using parseFloat, a (trimmed) string starting with one or more numeric characters followed by alphanumeric characters can convert to a Number, with Number that will not succeed. As in:

parseFloat('3.23abc'); //=> 3.23
Number('3.23abc'); //=> NaN

In both conversions, the input string is trimmed, by the way:

parseFloat('  3.23abc '); //=> 3.23
Number('   3.23 '); //=> 3.23
2 of 5
33

No. Both will result in the internal ToNumber(string) function being called.

From ES5 section 15.7.1 (The Number Constructor Called as a Function):

When Number is called as a function rather than as a constructor, it performs a type conversion...

Returns a Number value (not a Number object) computed by ToNumber(value) if value was supplied, else returns +0.

From ES5 section 15.1.2.3 (parseFloat (string)):

... If neither trimmedString nor any prefix of trimmedString satisfies the syntax of a StrDecimalLiteral (see 9.3.1) ...

And 9.3.1 is the section titled "ToNumber Applied to the String Type", which is what the first quote is referring to when it says ToNumber(value).


Update (see comments)

By calling the Number constructor with the new operator, you will get an instance of the Number object, rather than a numeric literal. For example:

typeof new Number(10); //object
typeof Number(10); //number

This is defined in section 15.7.2 (The Number Constructor):

When Number is called as part of a new expression it is a constructor: it initialises the newly created object.

🌐
MDN
mdn2.netlify.app › en-us › docs › web › javascript › reference › global_objects › parsefloat
parseFloat() - JavaScript | MDN
February 18, 2022 - The parseFloat() function parses an argument (converting it to a string first if needed) and returns a floating point number.
🌐
GitHub
github.com › mdn › content › blob › main › files › en-us › web › javascript › reference › global_objects › number › parsefloat › index.md
content/files/en-us/web/javascript/reference/global_objects/number/parsefloat/index.md at main · mdn/content
The **`Number.parseFloat()`** static method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns {{jsxref("NaN")}}. ... - : The value to parse, [coerced to a string](/en-US/doc...
Author   mdn