The only question in this case is whether the R. L. c. 112, § 72, is constitutional. This statute requires street railway companies to carry pupils of the public schools, *437in their regular course going from their homes to the schools and returning therefrom, at rates not exceeding half the regular fare charged by the company for the transportation of other passengers between the same points. The defendant offered evidence tending to show that one half the regular fare charged for passengers on its lines, within the limits of the towns in which it operates, is less than the average cost per passenger of their transportation. It offered to prove that its business is conducted economically. It also wished to show that one street railway company which is exempted from the operation of this statute transports nearly one half of all the passengers carried on street railways in this Commonwealth, and receives nearly one half of all the income received for the transportation of passengers on these street railways. This evidence was excluded.
The defendant contended and asked the judge to rule that the statute is repugnant to the fourteenth amendment of the Constitution of the United States, in that it does not apply to all the street railway companies in the Commonwealth, and does not apply to all persons using street railways, nor even to all pupils using street railways, but only to pupils of the public schools. It also asked for a ruling that the statute deprives it of its property without just compensation and without due process of law, and is repugnant to the tenth article of the Declaration of Rights of Massachusetts, and to the fifth and fourteenth articles of amendment to the Constitution of the United States. Exceptions were taken to the refusal of the judge to make these rulings.
The defendant does not question the. right of the Legislature reasonably to regulate its rates of fare. While this right is well, established, it can be exercised only in such a way as will not deprive the company of its property without compensation or without due process of law. Action of a Legislature in this particular is subject to the revisory power of the courts. Reagan v. Farmers’ Loan & Trust Co. 154 U. S. 362, 397, 399. Smyth v. Ames, 169 U. S. 466, 526. Cotting v. Kansas City Stock Yards Co. 183 U. S. 79, 91. If the effect of this statute were to compel the defendant to conduct its business at a loss, we should say unhesitatingly that the law was unconstitutional. But the section places no limitation upon the rates that may be *438charged generally. It only fixes, in connection with the regular rate, the relative fare to be charged for carrying pupils to and from the public schools. There is nothing in it to prevent the defendant from making its regular fare for passengers within the limits of a town six or seven cents instead of five cents, charging pupils in the public schools one half of the price so established.
The R. L. c. 112, § 1, leaves unchanged the provisions of law in force at the time of its enactment which were applicable to the Boston Elevated Railway Company. That company is thereby exempted from these provisions as to pupils of the public schools. It is contended that this makes a discrimination which deprives the defendant of the equal protection of the laws. The constitutional principle invoked in this contention does not require that the same laws shall be enacted for all street railway companies in different parts of a State. Attorney General v. Old Colony Railroad, 160 Mass. 62, 89. Covington & Lexington Turnpike Road Co. v. Sandford, 164 U. S. 578. Tilley v. Savannah, Florida & Western Railroad, 5 Fed. Rep. 641, 661. Ames v. Union Pacific Railway, 64 Fed. Rep. 165, 171. The situation of the lines of the Boston Elevated Railway Company, in the midst of a dense population, is so different from that of other lines in the State, and their fitness for use by children in going to and from the public schools, might be found by the Legislature to be so unlike that of street railways generally in the State, as properly to call for an exemption from the law established for others. We cannot say that the Legislature had no power to make this distinction, founded on differences in conditions.
The most important and difficult question in the case is whether there is constitutional justification for a discrimination between pupils of the public schools and other persons. If this were an absolute and arbitrary selection of a class, independently of good reasons for making a distinction, the provision would be unconstitutional and void. As was said by Mr. Justice Brewer in Gulf, Colorado & Santa Fe Railway v. Ellis, 165 U. S. 150, 159: “ Arbitrary selection can never be justified by' calling it classification. The equal protection demanded by the fourteenth amendment forbids this.” The subject of compelling *439a railroad company to make an exception as to its rates, in favor of a certain class of persons, was considered elaborately in Lake Shore & Michigan Southern Railway v. Smith, 173 U. S. 684, and it was held that ordinarily the Legislature has not power to compel such action. The subject is also referred to in Wisconsin, Minnesota & Pacific Railroad v. Jacobson, 179 U. S. 287, 301. But if the difference is founded on a reasonable distinction in principle, such discrimination does not deny the equal protection of the laws. Opinion of the Justices, 166 Mass. 589. Pacific Express Co. v. Seibert, 142 U. S. 339. American Sugar Refining Co. v. Louisiana, 179 U. S. 89, 92.
In this case the selection of a class is not entirely arbitrary. The education of children throughout the Commonwealth is a subject for legislation which has occupied the thoughts of our lawmakers from early times. The duty of legislatures and magistrates to be diligent in the promotion of education, among all the people, is specially declared in c. 5, § 2, of the Constitution of the Commonwealth. Compulsory attendance of children in the schools is provided for by our laws. R. L. c. 44, § 1. Money may be appropriated by cities and towns for conveying pupils to and from the public schools. R. L. c. 25, § 15. It cannot be said that the Legislature may not concern itself with the transportation of children to the public schools in the interest of popular education, just as it provides such children with books and other necessary articles. R. L. c. 42, § 35. So far as this" statute merely gives help to these pupils in connection with their acquisition of knowledge in the schools, it is justified. As a police regulation in the interest of education, the law may well require street railway companies to permit these children to ride to school upon their cars, without profit to the companies, provided it can be done without causing them loss. But if such a requirement involves expense, the cost can only be put upon the general taxpayers. It cannot be imposed upon the street railway companies, or upon that part of the public which pays fares to street railway companies. If, therefore, it plainly appeared that the enforcement of this section would cause expense to street railway corporations, which they must bear themselves, or put upon other classes of passengers in the form of increased fares to make good the loss from carrying school *440children at half rates, we should be obliged to hold that there was a taking of property without due process of law, through unconstitutional discrimination.
We are, therefore, brought to the inquiry whether it was possible for the Legislature to conclude that this provision would entail no loss upon the street railway companies. Was it not possible for legislators to decide that pupils, in most cases, go to and from the public schools at hours when the ears are not in use by persons going to and from their work, or by many persons ; that the pupils generally are of such age and size as not individually to occupy nearly so much space as other passengers; that the difference between full fare and half fare is of such importance to the parents of many of these pupils, that the number who would ride at the half rate, would be nearly if not quite twice as many as at the regular rate; and that for these and other reasons, railway companies would suffer no loss from carrying the children at half the regular fare? Unless we can say as matter of law that such a view would be untenable, we cannot hold that the statute is unconstitutional. Nothing less than a certainty that the provision would cause loss to the railway companies, or to some of them, would enable us to hold that the Legislature was powerless to make the requirement. The question is difficult and doubtful. It involves the consideration of facts which primarily are for the lawmaking power. All presumptions are in favor of the validity of legislation. The evidence offered by the defendant had no tendency to show that it would suffer loss by carrying these pupils at half the regular rates. For all that appears, it would be in better financial condition at the end of a year, if it carried the children in compliance with the statute, than if it did not carry any of them. We hesitate to say that our lawmakers could not pass the act as one which would put no financial burden upon anybody.
It has come to our notice in former cases, that before this statute was passed, similar conditions were sometimes imposed by towns in connection with grants of locations, and were accepted with seeming willingness by the railway corporations.
We are of opinion that the law is constitutional.
Exceptions overruled.