Handling Currency Values

Is there some way to handle currency? I’d like to input currency values like £56,000 and be able to display values in the same format. (I’m new to CL, so apologies if this is well known, but a ‘currency’ search offered nothing).

There’s no formatting. There’s basically text or math. I’m not sure your purpose. In a table? Input? There’s a round() function in a graph (accessible in CL), or integer in CL, if you’re only aim is to have a certain number of decimal places. You can’t limit student input to a certain format, but you could have warning messages based on criteria.

Many thanks for the clarification. I experimented before posting and found that for input, typing “$56,000” gives me the number “56000” but entering “£56,000” fails. “56,000” always works, so is there a way to take in “£56,000” as text, strip out the “£”, and then convert to a number?

Failing that I’d like to give students a helpful error message when “£56,000” is entered. Is that what you meant by “warning messages based on criteria”?

On output, it would be nice to have commas added, but I guess “£56000” is okay.

This is supporting a simple exercise in deducting tax from a salary.


You might be able to take “£56,000” and make a simpleFunction with £ as a variable, and evaluateAt(1). Something like this will give the 56000 I think (if Desmos accepts “£” as a variable):

output= simpleFunction(inputName.latex,"£").evaluateAt(1)


errorMessage: when isUndefined(this.numericValue) "Try without £"
otherwise "" 

If it’s a table cellErrorMessage(row,column)

Sorry Daniel, that produces the dreaded NaN! It does feel as if there should be some straightforward way to strip the first character off an input string…or at least check if a character/substring is part of the string. I’ll keep experimenting.