Bra sizes are a tiny, messy algorithm: US, UK and EU sizing in under 25 lines of JavaScript
A bra size looks like a lookup table. It is really a small algorithm with three quirks, and those three quirks explain most of the confusion people have about sizes. Here is the whole thing in plain JavaScript. The two inputs A size has a band number (34) and a cup letter (C).