# Toroid and Solenoid Flux

This is more a theoretical question than a practical one.
Basically I want to know if the formulas I arrive for the flux of a Toroid and a Solenoid are correct

Leaving aside the integration part this is the basic formula for the flux
$\phi = BNA$
B = magnetic field
N = number of turns of the solenoid/toroid
A = Area

So for the solenoid I arrive to this:
$B = \mu nI$ -> n = N/L
$A = 2\pi r(r+l)$ this is the area for a cylinder
$\phi = \mu nINA = \frac{\mu IN^{2}}{L}2\pi r(r+L)$

For the toroid I arrive to this:
$B = \frac{\mu NI}{2\pi r}$
$\phi = \int BNdr = \frac{\mu IN^{2}}{2\pi}ln\frac{b}{a}$