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
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › parseFloat
parseFloat() - JavaScript | MDN
The parseFloat function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or NaN.
🌐
W3Schools
w3schools.com › jsref › jsref_parsefloat.asp
JavaScript parseFloat() Method
The parseFloat() method parses a value as a string and returns the first number.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number › parseFloat
Number.parseFloat() - JavaScript | MDN
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.
🌐
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 › @roy.elaawar › parsefloat-vs-parstint-in-javascript-4f3d345f205f
ParseFloat vs ParseInt in JavaScript | by Roy Elaawar | Medium
November 6, 2023 - In summary, use parseInt when you want to convert a string to an integer, and use parseFloat when you want to convert a string to a floating-point number. The choice between them depends on the type of numeric value you are dealing with in your ...
🌐
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...
Find elsewhere
🌐
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.
🌐
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
Top answer
1 of 5
68

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.

🌐
Flexiple
flexiple.com › javascript › parsefloat-method
JavaScript parseFloat() Method - Flexiple
May 19, 2024 - The parseFloat() function in JavaScript takes a single argument, which is the string that needs to be converted into a floating-point number. This method parses a string argument and returns a floating point number until it reaches a character that is not part of a valid number syntax...
🌐
Medium
medium.com › @maxheadway › the-differences-between-number-and-parsefloat-in-javascript-8ee74b961ed4
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.
🌐
Itsourcecode
itsourcecode.com › home › parsefloat javascript: easily convert strings to numbers
parseFloat JavaScript: Easily Convert Strings to Numbers
July 9, 2026 - parseFloat() function in JavaScript is used to convert a string representation of a number into a floating-point number.
🌐
Blogger
self-learning-java-tutorial.blogspot.com › 2018 › 08 › javascript-parsefloat-convert-string-to.html
Programming for beginners: JavaScript: parseFloat: Convert string to float
August 29, 2018 - parseFloat converts the character by character, if it is unable to convert any character it ignores it and all succeeding characters and returns the float value parsed up to that point.
🌐
W3Schools
w3schools.com › js › js_number_reference.asp
JavaScript Number Reference
All number methods return a new value. They do not change the original number.
🌐
Wikipedia
en.wikipedia.org › wiki › JavaScript
JavaScript - Wikipedia
6 days ago - JavaScript (JS) is a programming language and core technology of the Web, alongside HTML and CSS. Created by Brendan Eich in 1995, it is maintained by Ecma International's TC39 technical committee, with related Web APIs maintained by W3C and WHATWG. In 2025, JavaScript was the most widely used ...
🌐
CodingCreativo
codingcreativo.it › javascript-parsefloat
JavaScript parseFloat — CodingCreativo
July 27, 2021 - In JavaScript the parseFloat function takes a string as an argument and returns a decimal number. The syntax is therefore the following: parseFloat(string). Where string represents the string to conve…