# Hash Code

*noun*

say it: **“HASH KOHD”** **/hæʃ koʊd/**

The whole number a hash function gives for a key, before a hash table keeps its remainder to pick a bucket.

## What is a **hash code**?

A **hash code** is the number a hash function gives for a key. A hash table divides it by its number of buckets and keeps the remainder to pick one. Two equal keys must always have the same hash code, or a lookup goes to the wrong bucket.

## In a sentence

- “Two equal member cards gave different **hash code**s, so the dictionary looked for the second one in the wrong bucket.”

Level: Journeyman · [More Data Structures terms at this level](https://www.ask-codey.com/glossary?category=data-structures&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/hash-code
