statutes us-federal-government
How many lines of text in all currently active federal laws of US?
<p>LOC (lines of code) is a useful measure of amount of work done in software development. It works well when comparing orders of magnitude. Hello world: 1-10 LOC. Tetris: 100-200 LOC. Gmail: 1 Million LOC, Windows XP: 50 Million LOC. </p>

<p>What is the estimated number of lines in all current US federal laws? </p>

<p>I realize that this metrics isn't accurate. Which font size do we use?  Do we include comments? How to count someone v. United States? </p>

<p>Since only order of magnitude matters we should use use 12px on letter, include comments and only include verdict if Supreme Court ruling changed the way a federal law is interpreted.</p>

<blockquote>
  <p>What is the estimated number of lines in all current US federal laws?</p>
  
  <p>I realize that this metrics isn't accurate. Which font size do we use?
  Do we include comments? How to count someone v. United States?</p>
</blockquote>

<p>U.S. federal law consists of:</p>

<ul>
<li><p>52 Titles of the United States Code (some of which have more than one volume) and a smattering of uncodified statutes that probably would take up one or two additional books. On the order of 100 volumes.</p></li>
<li><p>About 2 volumes worth of federal court rules of general applicability.</p></li>
<li><p>About 200 sets of local court rules for particular federal courts. On the order of 20 volumes for the whole set.</p></li>
<li><p>About 2000 volumes of the Federal Reporter which sets forth published appellate court decisions. </p></li>
<li><p>About 2150 volumes of the Federal Supplement which sets forth selected federal trial court opinions.</p></li>
<li><p>On the order of 500 volumes of the Federal Rules Decisions which sets forth selected trial court opinions interpreting court rules.</p></li>
<li><p>582 volumes of the United States Reporter which sets forth U.S. Supreme Court decisions.</p></li>
<li><p>A set of <a href="https://www.state.gov/s/l/treaty/tif/index.htm" rel="nofollow noreferrer">U.S. Treaties in Force</a> on the order of 20-30 volumes.</p></li>
<li><p>The Code of Federal Regulations (50 titles, some of which have more than one volume). On the order of 200 volumes.</p></li>
<li><p>Several hundred treaties with U.S. Indian tribes, probably about 20 volumes.</p></li>
<li><p>About 500 volumes of territorial legislation still in force (e.g. statutes of Guam, Puerto Rico, U.S. Virgin Islands, District of Columbia, Indian reservations).</p></li>
</ul>

<p>So, this would mean roughly 4500 volumes that have about 1000 pages of text each for a total of 4,500,000 pages, typically single spaced in 10 point (10/72nds of an inch) font on letter sized paper with half inch margins (i.e. 7.5 inches for text per page top to bottom) which works out to on the order of 50 lines per page.</p>

<p>So, <strong>roughly, 225 million lines of code equivalent for primary federal materials only.</strong></p>

<p>There are some judgment calls about definitions here. For example, I did not include the full text of all works deposited with the library of Congress as part of the documentation of copyrights, or the full text of all patents and trademarks ever issued, each of which would dramatically increase the total, even though reference to those materials is necessary to determine if another work infringes a copyright or patent. Similarly, I omitted recorded real estate documents and publicly filed corporate documents even though those could each be referenced as evidence in a court case to determine someone's legal rights. And, I didn't include court orders in trial courts with no precedential effects which are binding between the parties even though some consent decrees in that set of documents have the force of law.</p>

<p>Of course, the problem is that U.S. federal law isn't an independent body of law by itself, by design. U.S. federal law routinely incorporates the law of the state in question by reference. For example, criminal liability in federal parks is determined in part by reference to state law.</p>

<p>A full set of state statutes and regulations in a typical U.S. state would require perhaps 50 volumes for a total of about 2500 volumes, and the entire corpus of published state level case law for all states combined is on the order of 10,000 volumes. So, excluding municipal ordinances, you are looking at another 12,500,000 pages at 50 lines a page, for about 600 million lines of code. Local government ordinances are litigated in state court so there is no separate body of case law for them. </p>

<p>But, there are about 100,000 local governments and there are probably about 2 volumes of law for each, so about 200,000,000 pages and about 1,000 million lines of code.</p>

<p>I'm sure I've made some minor omissions (e.g., case law from the courts of U.S. Indian Tribes), but <strong>the grand total for all U.S. law local, state and federal is on the order of 2 billion (i.e. 2,000,000,000) lines of code.</strong></p>

<p>Also, keep in mind that this is only the primary materials and doesn't include treatises and textbooks and digests and law review articles interpreting the law which you need in practice to utilize this corpus of primary legal materials, and which can be referenced by courts in cases. On the other hand, secondary sources are profoundly less redundant than primary sources. You could have a pretty comprehensive collection of secondary sources with 2,000 volumes which would be about 2,000,000 pages and about 100 million lines of code which could be rolled into the omitted materials in my 2 billion lines estimate.</p>

<p>Of course, this is highly redundant. Case law spends lots of time reciting rulings from prior cases and the language of the relevant statutes and regulations, for example, and many municipal ordinances start out with an exact copy of another municipality's municipal ordinances before the municipality starts writing its own original legislation. Similarly, state traffic codes are often copied from one another. Also, not every reported case continues to be good law. But, there is no good way to separate the wheat from the chaff for a user of these legal authorities. You need them all.</p>

<p>Assuming that <a href="http://uscode.house.gov/download/download.shtml" rel="nofollow noreferrer">http://uscode.house.gov/download/download.shtml</a>  Public Law 115-55 
"All titles in the format selected compressed into a zip archive" covers most of the it we are dealing with <strong>10M-100M</strong>  lines of text. </p>

<p>Modern OS has similar volume. Would be curious to compare amount of dead and duplicate code in OS and in this set of laws.</p>
