NEW: English for Tech Bundle → Save 38%
Your progress…

Loading your progress…

Home
Code & Deliverynoun · /ˈvɛriəbəl/

variable

variable — A named container in code that stores a value or piece of data that can change during program execution.

In simple English

In software development, a variable is a named location in memory that holds a value. Think of it like a labeled box where you put information—you can put something in it, take it out, or change what is inside. Variables have names (like userName or totalPrice) and types (like integer, string, or boolean) that tell the program what kind of data they hold. Variables are essential because they allow code to be flexible and reusable. Instead of writing the same number over and over, you store it in a variable and reference that variable by name. This makes code easier to read, maintain, and change. In team meetings, developers constantly discuss variables—how to name them clearly, where to initialize them, and how they are passed between functions.

How to say it: Say VAIR-ee-uh-bul.

Understanding what a variable is, how to declare it, and why variables matter in programming.

At a glanceCEFR B2
Commonness5/5
Versatility5/5
FormalityCasualFormalNeutral
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK

Say it like this

  • Declare a variable
  • Initialize a variable with a value
  • The variable holds the user ID

Use it at work

Code review

  • Can you give this variable a clearer name?
  • This variable is never used.

Debugging

  • Log the variable before the call.
  • The variable is undefined here.

General

  • There are too many variables to give a fixed date.
  • Cost is the biggest variable.

Don't say this

✕The parameter is a variable that holds the user data.
✓The parameter is a variable that receives the user data when the function is called.

Parameter and variable are related but different—parameters are specifically function inputs, while variables are general data containers.

Practice

Try it

4 quick exercises

Pick the most natural phrasing

1. Your colleague is discussing naming conventions. Which sentence sounds most natural?

Complete the sentence

2. Before we use any data, we must _______ a _______ to store it.

Spot the mistake

3. Which sentence uses variable incorrectly?

Rewrite naturally

4. Rewrite this using variable naturally: 'We need a box to hold the number of items the user wants to buy.'

Say it out loud

Phrase 1 of 3

"Declare a variable"

We don't save your recording. The word check uses your browser's speech recognition.

More about variable

Real examples(3)

  • in a standup

    "I created a new variable to track the request timeout, so we can adjust it without changing the code multiple times."

  • in a code review

    "This variable name is too vague. Can you rename it from x to userCount for clarity?"

  • in a team meeting

    "We should define that variable globally so all modules can access the database connection."

More mistakes(2)

Handle with care. Non-native speakers sometimes confuse variable (a container for data) with parameter (input to a function). Also, do not use variable as a verb in tech English.

  • ✕We need to variable this code section.
    ✓We need to extract this code section into a variable.

    Variable is a noun, not a verb in tech English. You declare or initialize a variable, but you do not variable something.

  • ✕That variable is not flexible.
    ✓That variable name isn't clear or that value isn't flexible.

    Variables themselves are inherently flexible—you likely mean the name is unclear or the hardcoded value should be a variable.

Other forms(3)

  • variable noun

    "The variable stores the user email address."

  • variables noun (plural)

    "We declared three variables at the top of the function."

  • variable adjective

    "The variable cost changes based on demand."

Often used with(6)

  • declare a variable · Create and introduce a variable at the start of a scope.
  • initialize a variable · Set the starting value of a variable when you declare it.
  • local variable · A variable that exists only within a specific function or block of code.
  • global variable · A variable accessible throughout the entire program.
  • variable name · The label or identifier you give to a variable.
  • variable type · The data type (int, string, boolean, etc.) a variable holds.

Similar words(3)

  • parameter · Specifically refers to input values passed to a function; more narrow than variable.
  • field · A variable that belongs to a class or object; more specific context.
  • data container · A generic term; less common in professional tech English than variable.

Opposites(1)

  • constant

Questions(4)

What is the difference between a variable and a constant?
A variable stores data that can change during program execution. You declare it once and can reassign its value many times. A constant, by contrast, holds a value that never changes after initialization. Constants are useful for values like pi or API endpoints that should remain the same throughout your program.
How do I name a variable well?
Use clear, descriptive names that explain what the variable holds. Avoid single letters (except for loop counters) and abbreviations. Good examples are userName, totalPrice, or isActive. Poor examples are x, tmp, or data. Following naming conventions like camelCase or snake_case consistent with your team or language also matters.
What is the difference between a variable and a parameter?
A parameter is a special kind of variable—specifically, it is a variable that a function receives as input. Once inside the function, parameters are used just like any other variable. All parameters are variables, but not all variables are parameters.
Why should I avoid global variables?
Global variables can be accessed and modified from anywhere in your code, making it hard to track where changes happen. This can lead to bugs that are difficult to find. Local variables are safer because they exist only in a limited scope, making code easier to understand and test.
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

For bots & AI agents

Machine-readable versions of this page and Speak Tech English. Speak Tech English sells self-study ebooks and courses in English for tech, publishes free guides, a free glossary and a free newsletter; live lessons are on Mockly English. Fetch these instead of parsing this page.

This page (.md)llms.txtllms-full.txtai.txtGlossary (.md)Free guides (.md)All products (.md)Endpoint indexNewsletterLive lessons (Mockly)