gives True if a value has been defined for expr, and gives False otherwise.

Details and Options

  • ValueQ has attribute HoldAll.
  • ValueQ[expr,Methodm] uses the specified method to determine if the expression has a value defined for it.
  • Possible values for the option Method include:
  • Automaticautomatic behavior
    "SymbolDefinitionsPresent"one or more symbols have any sort of definition present
    "TrialEvaluation"test if the expression changes after evaluation
    "OwnValuesPresent"one or more symbols have a non-empty OwnValues
    "Legacy"match behavior in Version 12.1 and earlier
  • With the default method, Automatic, ValueQ[expr] effectively uses "OwnValuesPresent" if expr is a symbol and "SymbolDefinitionsPresent" for most other expressions.


open allclose all

Basic Examples  (2)

No value has been assigned to the variable x:

Assign a value:

Now ValueQ gives True:

Define a function:

ValueQ[f[x]] is True:

Scope  (4)

Check immediate and delayed values of symbols:

Check function definitions:

Expressions with head f give True whether or not they actually change:

Use a method that depends on the particular arguments:

ValueQ[LocalSymbol[]] gives True if and only if the local symbol has a value:

Options  (4)

Method  (4)

"SymbolDefinitionsPresent" tests if a symbol has any sort of evaluation definitions associated with it:

"OwnValuesPresent" tests whether any symbol has a direct assignment:

"TrialEvaluation" tests if the input expression will change:

"SymbolDefinitionsPresent" tests whether any code will run, even if it leaves the value unchanged:

The Automatic method gives the same results as "OwnValuesPresent" for symbols:

It agrees with "SymbolDefinitionsPresent" for more general inputs:

The Automatic method checks whether a LocalSymbol has an assigned value:

Properties & Relations  (3)

By default, ValueQ[symbol] only checks symbol for OwnValues, not other kinds of values:

ValueQ[x] is True because a value was assigned directory to x:

ValueQ[f] is False because f itself was not assigned a value:

For more general expressions, ValueQ checks for any kind of symbol definition:

ValueQ is HoldAll:

If x is allowed to evaluate prior to entering ValueQ, the result for y will be given:

Pi evaluates to itself:

Use NumericQ to find out whether there is a numerical value defined:

Possible Issues  (2)

ValueQ checks both user and built-in functions for definitions:

While f has no definitions, Plus does:

ValueQ is HoldAll:

Here x is evaluated before ValueQ sees it:

Use Unevaluated to preserve the HoldAll attribute:

Wolfram Research (1988), ValueQ, Wolfram Language function, (updated 2020).


Wolfram Research (1988), ValueQ, Wolfram Language function, (updated 2020).


Wolfram Language. 1988. "ValueQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020.


Wolfram Language. (1988). ValueQ. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_valueq, author="Wolfram Research", title="{ValueQ}", year="2020", howpublished="\url{}", note=[Accessed: 17-May-2024 ]}


@online{reference.wolfram_2024_valueq, organization={Wolfram Research}, title={ValueQ}, year={2020}, url={}, note=[Accessed: 17-May-2024 ]}