504
504 is the HTTP status code Gateway Timeout — a proxy waited for an upstream server and gave up.
- Even
- Composite
Where 504 fits
Why 504 is special
504 is 502's slower sibling. Where 502 means the upstream answered badly, 504 means it did not answer at all within the time allowed. The distinction matters when debugging: a 502 points at a crash or a malformed response, a 504 at something merely too slow, which is usually a database or an external call.
Not just a mathematical number
504is also used in ways where ordinary arithmetic doesn't apply — each listed below with what genuinely does and doesn't follow from it.
- Mathematical number
A genuine quantity — its mathematical properties (prime, square, factors, and so on) are real facts about it.
A genuine quantity that ordinary arithmetic applies to — it can be prime, even, a perfect square, added to another number meaningfully, and so on.
- Code
Also used as a code — HTTP status codes.
An assigned identifier from a fixed registry or standard — its digits don't represent an amount, and arithmetic on it is meaningless (HTTP status 404 + 1 is not a 'better' status; it's a different, unrelated code).
Factors & digit properties
- Divisors (24)
- 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 18, 21, 24, 28, 36, 42, 56, 63, 72, 84, 126, 168, 252, 504
- Prime factorisation
- 2^3 × 3^2 × 7
- Digit sum
- 9
- Digital root
- 9
Representations
- Decimal
- 504
- Scientific notation
- 5.040 × 10^2
Roman numerals
D I V
DIV uses the subtractive pair IV: one before five — five minus one.
Binary
1 1 1 1 1 1 0 0 0
1 × 256 + 1 × 128 + 1 × 64 + 1 × 32 + 1 × 16 + 1 × 8 + 0 × 4 + 0 × 2 + 0 × 1 = 504
Octal
7 7 0
7 × 64 + 7 × 8 + 0 × 1 = 504
Hexadecimal
1 f 8
1 × 256 + f × 16 + 8 × 1 = 504
Read as powers of two: 256 + 128 + 64 + 32 + 16 + 8 = 504.
In historical numeral systems
Egyptian
5 coils of rope, 4 strokes
5 × 100 + 4 × 1 = 504. The signs are simply repeated and added; where they sit on the line is a matter of layout, not value.
Babylonian
8 vertical wedges (sixties place), 2 corner wedges + 4 vertical wedges (units place)
8 × 60 + 24 = 504. Places are separated by a space on the tablet, with the higher place written first.
Greek (Ionic)
phi, then delta, marked as a numeral
phi-delta + keraia
phi + delta written in descending order and added — the letters carry their values wherever they stand, so this is addition, not place value.
Hebrew numerals
tav, then qof, then dalet
tav-qof-dalet
tav (400) + qof (100) + dalet (4) = 504, written in descending order.
Systems that simply cannot reach this value are left out. Where a script needs a font most readers do not have, the reading is given instead of the glyphs — see number systems for each system in full.
Other mathematical patterns
- Abundant number
- Harshad (Niven) number
Related numbers & connections
504 means an intermediary waited for an upstream server and gave up.
504 is the standard gateway timeout. Cloudflare's 522 narrows it to a connection that never opened, separating an unreachable origin from a slow one.
View 522 →Technology & computing
The Peugeot 504 was engineered with long-travel suspension for poor surfaces and became a mainstay in Africa, where local assembly continued long after European production ended in 1983.
DocumentedTechnology & computingGeography: France and West AfricaPeriod: 1968–2006504 and 502 both come from an intermediary but point at different faults: 502 means the upstream replied with something unusable, 504 means it never replied in time. When debugging, that distinction usually separates a crash from a slow database query or a hanging external call.
DocumentedTechnology & computing
Common questions
Is 504 a prime number?
No, 504 is not prime.
What are the factors of 504?
The factors of 504 are 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 18, 21, 24, 28, 36, 42, 56, 63, 72, 84, 126, 168, 252, 504.
What is 504 in Roman numerals?
504 in Roman numerals is DIV. IV is subtractive: one before five — five minus one. Written additively it would be DIIII, which Roman inscriptions used freely — the strict subtractive form is a later convention.
About this page's data
Mathematical facts:computed directly from the number's value — nothing to source or verify externally.
Contextual records: 2 reviewer-confirmed records, sourced and reviewed before publication.
Last reviewed: 15 July 2026