TechChee.com, shop online for gadget, gizmo and hot tech stuff

Gadget vista, shop & buy online, gadget online store, corporate gift, software, web 2.0 and tech news

 

Online Bra size calculator




Posted by ketyung
on Mon, Dec 1st, 08
at 8:39 am

Bookmark and Share


Ed Spencer has worked for a lingerie boutique in the UK where he “was forced” to program some JavaScript functions for a website that does the calculation for bra size. And he shares out these functions on his blog. So, I’ve borrowed these JavaScript functions and included here and make a very simple bra size calculator here on TechChee.com.

To calculate the bra size, what you need is to enter the cup size and also the band size, it’ll then show you the size you need. I think it might be handy for geeks who wanna buy nice bras for their GFs, significant others, loved ones, wives or whoever as gift for the coming Christmas, but you ain’t know what the size you shall go for.

Online Bra size calculator
Cup size
Band size
Your Perfect Bra size is



If you wonder what the band and the cup sizes are all about, you can refer to the original version which is on the original website that Spencer built the script for. It has a detailed and pictorial explanation about the two sizes.

Spencer described his experience of building this Bra size calculator as “The theory behind bra size calculation is arcane and somewhat magical. Understanding of it does not come easily to man nor beast, so it is lucky that I, falling cleanly into neither category, have passed through pain and torment to save you the trouble.”

If you happened to work for another lingerie online store, and you were also “forced” to build one of these calculators, you’ll only need to include Spencer’s JavaScript codes as follows, and you also need the jQuery library.

The code

var BraCalculator = {
/**
* The string to be returned when the result could not be calculated. Overwrite to change this
*/
unknownString: “Unknown”,

cupSizes: ["A", "B", "C", "D", "DD", "E", "EE", "F", "FF", "G", "GG", "H", "HH",
"J", "JJ", "K", "KK", "L", "LL", "M", "MM", "N", "NN"],

/**
* Returns the correct bra size for given under bust and over bust measurements
* @param {Number} underBust The measurement taken under the bust (in inches)
* @param {Number} overBust The measurement taken over the bust (in inches)
* @return {String} The correct bra size for the given measurements (e.g. 32C, 40DD, etc)
*/
calculateSize: function(underBust, overBust) {
var bandSize = this.calculateBandSize(underBust);
var cupSize = this.calculateCupSize(bandSize, overBust);

if (bandSize && cupSize) {
return bandSize + cupSize;
} else {
return this.unknownString;
};
},

/**
* Calculates the correct band size for a given under bust measurement
* @param {Number} underBust The measurement under the bust
* @return {Number} The correct band size
*/
calculateBandSize: function(underBust) {
var underBust = parseInt(underBust, 10);
return underBust + (underBust % 2) + 2;
},

/**
* Calculates the Cup size required given the band size and the over bust measurement
* @param {Number} bandSize The measured band size (should be an even number)
* @param {Number} overBust The measurement taken over the bust
* @return {String} The appropriate alphabetical cup size
*/
calculateCupSize: function(bandSize, overBust) {
var bandSize = parseInt(bandSize, 10);
var overBust = parseInt(overBust, 10);
var diff = overBust – bandSize;

var result = this.cupSizes[diff];

//return false if we couldn’t lookup a cup size
return result ? result : false;
}
};

And apply the following to on the page that has the form for the Bra size calculation.

jQuery(document).ready(function(){
//add listeners to band and cup measurement text boxes
jQuery(’#back’).keyup(Honeys.updateBraSizeCalculation);
jQuery(’#cup’).keyup(Honeys.updateBraSizeCalculation);
});

var Honeys = {
updateBraSizeCalculation: function() {
var back = jQuery(’#back’)[0].value;
var cup = jQuery(’#cup’)[0].value;

if (back.length > 0 && cup.length > 0) {
jQuery(’#fit’)[0].value = BraCalculator.calculateSize(back, cup);
};
}
};

Please note the above calculator is meant sizes in the UK. And you’ll have to modify your own version to suit the country using the conversion chart.

The above picture shows the Robot bra that comes with cute and geeky robot icons printed, and it can be purchased online from Tillys.com.

via [Ed Spencer Blog], via [ajaxian]

Now you can receive our articles for FREE in your email inbox. To receive more information on gadgets, software, latest news and reviews on technologies, just enter your email:
Email:   Delivered by FeedBurner

4 Responses to “Online Bra size calculator”

  1. Seo Brain.com Says:

    Since this script might be useful for female, but not for me because when i put the size in the box, the result always give me message like this : “OMG, We couldn’t get the size you want, it must be a freak!” lol.. maybe i must ask my girl friend to try this nice tool.. :D

  2. ketyung Says:

    Yeah :D Lets say if you keyed in 35 for the cup size and 30 for the band size then you shall get 32D.. hehe this is the UK size :) yeah I’m also one of those who ain’t know much abt the cup and band size, only gals know better :D

  3. Liara Says:

    Um… Your calculator says I should wear a 30D bra. All the bras, save one, that I own at the moment are 32A, the smallest size I can find in physical store locations outside the children’s department, and I’m only just now starting to not have noticeable air pockets in some of them at age twenty-one. And this is *with* padding. Considering that even a super pushup bra in the size I am currently wearing cannot give me actual cleavage (let alone accidental quadri-boob)… I’m rather small-chested, you see, so I have a great deal of difficultly believing my real size could be a D. Sorry, but I have to doubt your measurements quite strongly, since the US and British size seem to match each other in this case.

  4. Keira Says:

    All Bra calculators in the world (I’ve tried them all!) are broken, the one that come closest to a result are those that use above the breast measurement as band size (with no adding).

    I know EXACTLY what size I should be (32C or 34B) with my
    measurements since I know how a bra should fit (no puckering, 4 fingers AT MOST behind the bra strap, band horizontal, etc); I’ve tried hundreds in my life.

    It takes much more than 2 measurements to account for differences in muscle and fat distribution, breast shape, tapering of the ribs (depends on how tall you are), etc.

    Core muscles in particular really messes the formula because it increases the calculated below breast circonference a lot (in my case, if I compare to when I was 16: at least 4 inches (28 inch then, now 32 inch).

Leave a Reply

Subscribe to our newsletter for FREE, just enter your email below:
 

Delivered by FeedBurner

FeedBurner feed subscriber count