[proofplan]
We prove the result by induction on $n$, with the base case $n = 1$ established by the [Homology of $S^1$](/theorems/2250). For the inductive step, we cover $S^n$ by two open sets $A = S^n \setminus \{N\}$ and $B = S^n \setminus \{S\}$, each homeomorphic to $\mathbb{R}^n$ and hence contractible. Their intersection satisfies $A \cap B \simeq S^{n-1}$. Since all higher homology of $A$ and $B$ vanishes, the Mayer--Vietoris sequence collapses to isomorphisms $H_k(S^n) \cong H_{k-1}(S^{n-1})$ for $k \geq 2$, and a short exact analysis in low degrees completes the calculation.
[/proofplan]
[step:Establish the base case $n = 1$ and state the inductive hypothesis]
The case $n = 1$ is the content of the [Homology of $S^1$](/theorems/2250):
\begin{align*}
H_k(S^1) = \begin{cases} \mathbb{Z} & k = 0, 1 \\ 0 & \text{otherwise.} \end{cases}
\end{align*}
This agrees with the claimed formula (with $n = 1$, the nonzero groups occur at $k = 0$ and $k = n = 1$).
For the inductive step, fix $n \geq 2$ and assume the result holds for $S^{n-1}$:
\begin{align*}
H_k(S^{n-1}) = \begin{cases} \mathbb{Z} & k = 0 \text{ or } k = n - 1 \\ 0 & \text{otherwise.} \end{cases}
\end{align*}
[/step]
[step:Cover $S^n$ by two contractible open sets whose intersection deformation retracts onto $S^{n-1}$]
Let $N = (0, \ldots, 0, 1) \in S^n$ and $S = (0, \ldots, 0, -1) \in S^n$ denote the north and south poles. Define
\begin{align*}
A &:= S^n \setminus \{N\}, \\
B &:= S^n \setminus \{S\}.
\end{align*}
Both $A$ and $B$ are open in $S^n$ (as complements of single points in a Hausdorff space), and $A \cup B = S^n$.
Stereographic projection from $N$ gives a homeomorphism $A \cong \mathbb{R}^n$, and stereographic projection from $S$ gives a homeomorphism $B \cong \mathbb{R}^n$. Since $\mathbb{R}^n$ is contractible, both $A$ and $B$ are contractible. In particular,
\begin{align*}
H_k(A) = H_k(B) = \begin{cases} \mathbb{Z} & k = 0 \\ 0 & k \geq 1. \end{cases}
\end{align*}
The intersection $A \cap B = S^n \setminus \{N, S\}$ deformation retracts onto the equatorial sphere $S^{n-1} = \{x \in S^n : x_{n+1} = 0\}$ via the map that projects each point radially to the equator. Therefore $A \cap B \simeq S^{n-1}$, and $H_k(A \cap B) \cong H_k(S^{n-1})$ for all $k$.
[guided]
The idea is to decompose $S^n$ into two overlapping pieces, each as simple as possible, and use the Mayer--Vietoris sequence to relate $H_*(S^n)$ to $H_*(A \cap B)$.
The simplest decomposition removes one point at a time. Removing the north pole $N$ gives $A = S^n \setminus \{N\}$. Stereographic projection from the removed point provides a homeomorphism $A \cong \mathbb{R}^n$: the explicit map sends $x = (x_1, \ldots, x_{n+1}) \in S^n \setminus \{N\}$ to $\frac{1}{1 - x_{n+1}}(x_1, \ldots, x_n) \in \mathbb{R}^n$. Since $\mathbb{R}^n$ is contractible (via the straight-line homotopy to the origin), $H_k(A) = 0$ for all $k \geq 1$ and $H_0(A) \cong \mathbb{Z}$.
The same argument applies to $B = S^n \setminus \{S\}$ via stereographic projection from the south pole. Together, $A \cup B = S^n$ (every point of $S^n$ is either not $N$ or not $S$; in fact every point except possibly $N$ and $S$ belongs to both).
The intersection $A \cap B = S^n \setminus \{N, S\}$ is the sphere with both poles removed. The deformation retraction onto the equator $S^{n-1}$ is given by the homotopy
\begin{align*}
F: [0, 1] \times (S^n \setminus \{N, S\}) &\to S^n \setminus \{N, S\} \\
(t, x) &\mapsto \frac{((1-t)x_{n+1}) e_{n+1} + (x_1, \ldots, x_n, 0)}{|((1-t)x_{n+1}) e_{n+1} + (x_1, \ldots, x_n, 0)|},
\end{align*}
which continuously deforms the last coordinate toward $0$ while staying on $S^n$. At $t = 0$ this is the identity, and at $t = 1$ the image lies in $\{x_{n+1} = 0\} \cap S^n = S^{n-1}$. This is well-defined because the poles (where the denominator could vanish) have been removed. Therefore $A \cap B \simeq S^{n-1}$.
[/guided]
[/step]
[step:Apply the Mayer--Vietoris sequence for $k \geq 2$ to obtain $H_k(S^n) \cong H_{k-1}(S^{n-1})$]
The [Mayer--Vietoris sequence](/theorems/???) for the cover $S^n = A \cup B$ reads, for each $k$:
\begin{align*}
\cdots \to H_k(A) \oplus H_k(B) \to H_k(S^n) \xrightarrow{\partial} H_{k-1}(A \cap B) \to H_{k-1}(A) \oplus H_{k-1}(B) \to \cdots
\end{align*}
For $k \geq 2$, we have $H_k(A) = H_k(B) = 0$ (since $A$ and $B$ are contractible) and $H_{k-1}(A) = H_{k-1}(B) = 0$ (since $k - 1 \geq 1$). The relevant portion of the exact sequence becomes
\begin{align*}
0 \to H_k(S^n) \xrightarrow{\partial} H_{k-1}(A \cap B) \to 0.
\end{align*}
Exactness forces $\partial$ to be an isomorphism:
\begin{align*}
H_k(S^n) \cong H_{k-1}(A \cap B) \cong H_{k-1}(S^{n-1}).
\end{align*}
By the inductive hypothesis, $H_{k-1}(S^{n-1}) \cong \mathbb{Z}$ if $k - 1 = 0$ or $k - 1 = n - 1$, and $H_{k-1}(S^{n-1}) = 0$ otherwise. Since $k \geq 2$, the case $k - 1 = 0$ gives $k = 1$, which is excluded. Therefore, for $k \geq 2$:
\begin{align*}
H_k(S^n) \cong \begin{cases} \mathbb{Z} & k = n \\ 0 & \text{otherwise.} \end{cases}
\end{align*}
[guided]
For $k \geq 2$, both $H_k(A) \oplus H_k(B) = 0$ and $H_{k-1}(A) \oplus H_{k-1}(B) = 0$, since contractible spaces have trivial homology in all positive degrees. The Mayer--Vietoris sequence simplifies to
\begin{align*}
0 \to H_k(S^n) \xrightarrow{\partial} H_{k-1}(A \cap B) \to 0,
\end{align*}
which is a short exact sequence with trivial terms on either side. By exactness, $\partial$ is both injective (kernel is $0$) and surjective (image equals the full group), hence an isomorphism.
Why does this not apply for $k = 1$? Because $H_0(A) \oplus H_0(B) \cong \mathbb{Z}^2 \neq 0$, so the sequence does not collapse in the same way. The $k = 1$ case requires a separate analysis of the low-degree portion of the Mayer--Vietoris sequence.
Using the inductive hypothesis on $H_{k-1}(S^{n-1})$: this is $\mathbb{Z}$ when $k - 1 = n - 1$ (i.e., $k = n$) and $0$ for all other $k - 1 \geq 1$ (since $n \geq 2$ ensures $k - 1 = 0$ is excluded from the range $k \geq 2$). Thus $H_k(S^n) \cong \mathbb{Z}$ for $k = n$ and $H_k(S^n) = 0$ for $k \geq 2$ with $k \neq n$.
[/guided]
[/step]
[step:Analyse the low-degree Mayer--Vietoris sequence to compute $H_0(S^n)$ and $H_1(S^n)$]
The low-degree portion of the Mayer--Vietoris sequence reads:
\begin{align*}
\cdots \to H_1(A) \oplus H_1(B) \to H_1(S^n) \xrightarrow{\partial} H_0(A \cap B) \xrightarrow{i_{A*} \oplus i_{B*}} H_0(A) \oplus H_0(B) \to H_0(S^n) \to 0.
\end{align*}
Since $H_1(A) = H_1(B) = 0$, the sequence begins
\begin{align*}
0 \to H_1(S^n) \xrightarrow{\partial} H_0(A \cap B) \xrightarrow{i_{A*} \oplus i_{B*}} H_0(A) \oplus H_0(B) \to H_0(S^n) \to 0.
\end{align*}
Since $n \geq 2$, the intersection $A \cap B \simeq S^{n-1}$ is path-connected (as $S^{n-1}$ is path-connected for $n - 1 \geq 1$), so $H_0(A \cap B) \cong \mathbb{Z}$. Both $A$ and $B$ are path-connected, so $H_0(A) \cong H_0(B) \cong \mathbb{Z}$.
The map $i_{A*} \oplus i_{B*}: H_0(A \cap B) \to H_0(A) \oplus H_0(B)$ sends the generator $[p]$ (the homology class of any point $p \in A \cap B$) to $(i_{A*}[p], i_{B*}[p]) = ([p], [p])$. Since all spaces are path-connected, this is the map $\mathbb{Z} \to \mathbb{Z} \oplus \mathbb{Z}$ given by $1 \mapsto (1, 1)$. This map is injective.
By exactness at $H_0(A \cap B)$: $\ker(i_{A*} \oplus i_{B*}) = \operatorname{im}(\partial)$. Since $i_{A*} \oplus i_{B*}$ is injective, $\operatorname{im}(\partial) = 0$, so $\partial = 0$. By exactness at $H_1(S^n)$: $\ker(\partial) = \operatorname{im}(0 \to H_1(S^n)) = H_1(S^n)$. Since $\partial$ is injective (its kernel is the image of the zero map from $H_1(A) \oplus H_1(B) = 0$), and $\partial = 0$, we conclude $H_1(S^n) = 0$.
For $H_0$: since $S^n$ is path-connected (for $n \geq 1$), $H_0(S^n) \cong \mathbb{Z}$.
[guided]
For $n \geq 2$, the low-degree analysis requires understanding the map $i_{A*} \oplus i_{B*}$. The key point is that $A \cap B \simeq S^{n-1}$ is path-connected (since $n - 1 \geq 1$), so $H_0(A \cap B) \cong \mathbb{Z}$, generated by the class of any point.
The inclusions $i_A: A \cap B \hookrightarrow A$ and $i_B: A \cap B \hookrightarrow B$ send a point $p \in A \cap B$ to the same point viewed in $A$ or $B$. On $H_0$, both maps send the generator $[p]$ to the generator of $H_0(A) \cong \mathbb{Z}$ (respectively $H_0(B) \cong \mathbb{Z}$), since all spaces are path-connected and any two points in a path-connected space represent the same $H_0$ class. Therefore $i_{A*} \oplus i_{B*}$ is the map $1 \mapsto (1, 1)$, which is injective.
Injectivity of $i_{A*} \oplus i_{B*}$ kills the connecting homomorphism $\partial: H_1(S^n) \to H_0(A \cap B)$: by exactness, $\operatorname{im}(\partial) = \ker(i_{A*} \oplus i_{B*}) = 0$. But $\partial$ is also injective because the map preceding it (from $H_1(A) \oplus H_1(B) = 0$) has zero image. An injective map with zero image must have zero domain, so $H_1(S^n) = 0$.
Compare this with the $n = 1$ case: there, $A \cap B$ has two path components, so $H_0(A \cap B) \cong \mathbb{Z}^2$, and the map $i_{A*} \oplus i_{B*}: \mathbb{Z}^2 \to \mathbb{Z}^2$ has a nontrivial kernel, which allows $H_1(S^1) \cong \mathbb{Z}$. For $n \geq 2$, the connectivity of $A \cap B$ eliminates this possibility.
[/guided]
[/step]
[step:Combine the results to complete the induction]
Collecting the results from the previous two steps, for $n \geq 2$:
\begin{align*}
H_k(S^n) = \begin{cases} \mathbb{Z} & k = 0 \quad (\text{path-connectedness}) \\ 0 & 1 \leq k \leq n - 1 \quad (\text{low-degree analysis and Mayer--Vietoris isomorphism}) \\ \mathbb{Z} & k = n \quad (\text{Mayer--Vietoris isomorphism with } H_{n-1}(S^{n-1}) \cong \mathbb{Z}) \\ 0 & k > n \quad (\text{Mayer--Vietoris isomorphism with } H_{k-1}(S^{n-1}) = 0). \end{cases}
\end{align*}
This agrees with the claimed formula. Together with the base case $n = 1$, the proof by induction on $n$ is complete.
[/step]