Is there an agreed definition as to how many nucleic acid bases constitute a gene?
If not, why not? I'm not sure I understand how the exact sizes of genes are defined.
Is there an agreed-upon definition as to how many nucleobases constitute a gene?
If not, why not?
There is no such definition. A gene is a region of the DNA that is transcribed. Typically a gene should have a transcription start site dictated by a promoter and a transcription stop site marked by termination signals (like terminators and poly-A signal etc.)
There are some little RNAs (~18nt) that are produced from TSS of usual genes but are probably products of failed elongation. These are not really considered genes as they are heterogeneous in size and are not marked by any boundary.
There may technically be a minimum cutoff on gene length which could be the length of DNA necessary for the RNA-polymerase to sit and also include the termination signals. As indicated in the comments, the smallest gene may be the tRNA. However, the smallest annotated gene from the GENCODE annotations is TRDD1 (just 7nt long!!!). This is not based on gene prediction; it is manually annotated by the HAVANA team.
What is the average length of a gene?
I just did a rough calculation from the GENCODE human genome annotation file (version 23).
The average transcript length seems to be around: 1.5kb
The average gene length seems to be around: 29kbp
The genes would be longer than (or equal to) their corresponding transcripts because the latter gets shortened due to splicing.
I made a histogram plot of these lengths for convenience:
Transcript length distribution
Gene length distribution
Note the sharp peaks at 100bp. Quite interesting!
Remi has user19099 have mentioned that the longest gene in humans is titin. It seems that it is the longest gene in many other diverse animals. See What's the longest transcript known? for more details.
To calculate gene length distribution: I parsed the GTF file for "genes" (third field i.e. feature) and subtracted the fifth field (stop) from fourth (start).
To calculate transcript length distribution: Got the transcript fasta file from the annotated locations. Calculated their lengths. Plotted the distribution.
How are gene size defined?
DNA is made of 4 nucleotides
G. A series of such nucleotide make up any section of the genome including the genes. The number of nucleotide in a gene is what we call the gene size. Of course, one might discuss on the definition of the exact beginning and end (and methods to determine them) of a gene but this is a discussion for another time.
Because, DNA is double stranded, instead of talking about a sequence of 10 nucleotides, we often talk about a sequence of 10 base pairs (bp). When dealing with longer sequence, we can use the prefix "kilo (k)" to indicate one thousands base pairs. For example: 12 kbp = 12,000 bp. For even bigger values, prefix "Mega (M)" is used to indicate one million base pairs. For example: 7 Mbp = 7,000 kbp = 7,000,000 bp.
Average and median gene size in humans
There is a lot of variation in gene size among genes within a species but also among species. So much so, that an average does not convey much information. But here is the average and median gene size in humans:
The extremes in the human genome
As @user19099 said, the longest gene in the human genome is TTN coding for the titin protein. TTN is about 100 kbp long. tRNA are typically very short sequences (76-90 nucleotides) but please not that these sequences will never be translated into proteins.
The book A Short Guide to the Human Genome by Scherer is very good to give a feeling of what the human genome looks like.
Interpretation of the question
You ask two things: 1. the number of nucleic acid bases that constitutes a gene, 2. (implied) how the size of genes are defined. The first question appears strangely naïve, but the second suggests this may be a misunderstanding. I therefore intend to start there.
How are the limits of a gene defined?
Genes are defined in terms of their information content — most obviously to specify proteins which may confer a phenotype, but also in specifying structural and regulatory RNA molecules. The extent of genes, or the length of DNA they occupy, is therefore determined by their information content.
Are genes contained in similar size DNA ‘boxes’?
Your first sentence suggests you think all genes have a fixed number of nucleic acid bases. This idea seems strange as, at the simplest level (e.g. in bacteria), their information content differs in size with the size of their protein or RNA products. However perhaps you have the idea that the genome is divided into similar sized regions with a discrete start and finish into which the information is accommodated (the rest being packing, as it were). This is not the case.
Genes occupy different lengths of DNA
In fact, the lengths of different genes differ within a species and between species. In simple prokaryotes this is mainly because they encode proteins (or RNAs) of different lengths. In eukaryotes (where the genes are generally much larger) this is further complicated because of the varying number and size of their introns, which do not (normally) encode protein.
How are the end-points of a gene determined in practice?
A simple answer to the above (appropriate to the level of your original question) would be that genes extend from the promotor regions, where the RNA polymerase binds for transcription, to the transcription termination point. Thus, at a first approximation, they can therefore be defined in practice by the regions of DNA that specify mRNA (or pre-mRNA) or other RNAs. The modern method for doing this would be RNAseq.
(The situation is more complicated than this in practice because there may be regions of the DNA that affect the expression but are not transcribed. But I wouldn’t worry about that at the moment.)