Kepler Space Telescope and Transiting Exoplanet Survey Satellite unveiled that Sun-like stars frequently host exoplanets. These exoplanets are subject to fluxes of ionizing radiation in the form of X-ray and extreme-ultraviolet (EUV) radiation that may cause changes in their atmospheric dynamics and chemistry. While X-ray fluxes can be observed directly, EUV fluxes cannot be observed because of severe interstellar medium absorption. Here, we present a new empirical method to estimate the whole stellar XUV (X-ray plus EUV) and FUV spectra as a function of total unsigned magnetic fluxes of stars. The response of the solar XUV and FUV spectrum (0.1-180 nm) to the solar total unsigned magnetic flux is investigated by using the long-term Sun-as-a-star dataset over 10 yrs, and the power-law relation is obtained for each wavelength with a spectral resolution of 0.1-1 nm. We applied the scaling relations to active young Sun-like stars (G-dwarfs), EK Dra (G1.5V), π1 Uma (G1.5V) and κ1 Ceti (G5V), and found that the observed spectra (except for the unobservable longward EUV wavelength) are roughly consistent with the extension of the derived power-law relations with errors of an order of magnitude. This suggests that our model is a valuable method to derive the XUV/FUV fluxes of Sun-like stars including the EUV band mostly absorbed at wavelengths longward of 36 nm. We also discuss differences between the solar extensions and stellar observations at the wavelength in the 2-30 nm band and concluded that simultaneous observations of magnetic and XUV/FUV fluxes are necessary for further validations.