Skip to content

Pas encore disponible en français. Voir tout ce qui existe en français

Stockertim Dictionary · Technology

Data type

Also called data types, field type, dtype

In short

The kind of value a column or field holds, such as a whole number, a decimal, text, a date or a true-or-false flag, which decides what can be done with it.

  • Advanced
  • Technology
  • Checked

In detail

A data type tells a program what sort of value sits in a column and therefore which operations make sense. Common types include integers for whole numbers, floating-point or fixed decimal numbers for prices and ratios, text strings for names and tickers, dates and timestamps for when something happened, and Boolean values for yes-or-no flags. Databases, spreadsheets and programming languages all assign types, sometimes by guessing when a file is first loaded.

Types matter because the same characters can mean different things. The entry 01/02/2026 is the first of February in the UK but the second of January in the US, and a reader that guesses wrongly scrambles a price history. A column of share prices that arrives as text sorts alphabetically, so 100 comes before 20, and it cannot be summed or averaged until it is converted. Leading zeros in account numbers or codes vanish if the column is read as a number.

Choosing a type is also a choice about precision. Floating-point numbers store most decimals approximately, which is fine for statistics but can leave tiny rounding gaps in accounting totals, so ledgers often use fixed decimal types or whole units such as kobo or pence. Checking the type of every column straight after an import is one of the cheapest ways to catch errors before they spread into results.

Worked example

A file of closing prices for Kestrel Foods loads with the price column as text, because one row reads 'n/a'.

  1. Sorted as text, the values 98, 105 and 1020 come out in the order 1020, 105, 98
  2. After converting to numbers and marking 'n/a' as missing, the average is (98 + 105 + 1020) / 3 = 407.67

Only once the column holds numbers do sorting and averaging give sensible answers.

In practice

Analysts loading exchange price files, company filings or central bank statistics check column types first, because a wrong type is easiest to fix at the point of import. Database tables declare their types when they are created, and data tools show the type each column was given.

Watch out

  • A number stored as text can look normal on screen yet fail silently in sums, sorts and averages.
  • Dates are ambiguous between day-first and month-first formats; state the format when reading a file.
  • A blank is not zero: missing values need their own treatment.

Learn it properly

Official sources

Facts last checked on 4 November 2026.

Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.

English