The paper studies the soft X-ray data of solar flares and found that the distribution functions of flare fluence are successfully modeled by tapered power law or gamma function distributions whose power exponent is slightly smaller than 2, indicating that the total energy of the flare populations is mostly due to a small number of large flares. The largest possible solar flares in 1000 years are predicted to be around X70 (a peak flux of 70 × 10−4 W m−2) in terms of the GOES (Geostationary Operational Environmental Satellites) flare class. The paper also studies superflares (more energetic than solar flares) from solar-type stars and found that their power exponent in the fitting of the gamma function distribution is around 1.05, which is much flatter than solar flares. The distribution function of stellar flare energy extrapolated downward does not connect to the distribution function of solar flare energy.